misolutions

controller

Sep 22nd, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.40 KB | None | 0 0
  1. public String SaveFinanceInfoPTJ(ConsultationViewModel model)
  2.         {
  3.             string result = "Success";
  4.             var user = LoginUser.GetLogin();
  5.             int StafPk = user.STAF_FK;
  6.             string ID = model.regpk2;
  7.  
  8.             CONS_UTMFIN_TABLE obj = new CONS_UTMFIN_TABLE();
  9.  
  10.             try
  11.             {
  12.                 if (model.cekUTMFINPart == "Yes")
  13.                 {
  14.                     foreach (string dtUTMFIN in model.source_no_utmfin)
  15.                     {
  16.                         ConsultationModel consModel = new ConsultationModel();
  17.                         CONS_UTMFIN_TABLE obj2 = new CONS_UTMFIN_TABLE();
  18.                         obj.SOURCE_NO_UTMFIN = dtUTMFIN;
  19.                         obj2 = consDB.getDataUTMFIN(obj);
  20.                         consModel.REGISTRATION_PK = ID;
  21.                         consModel.SOURCE_NO = obj2.SOURCE_NO;
  22.                         consModel.SODO = obj2.SODO;
  23.                         consModel.TOTAL_AMOUNT_FIN = obj2.TOTAL_AMOUNT_FIN;
  24.                         consModel.UTMFIN_DATE = obj2.UTMFIN_DATE;
  25.  
  26.                         consDB.AddViewTableFinPTJ(consModel);
  27.                     }
  28.                 }
  29.                 else
  30.                 {
  31.                    
  32.                 }
  33.             }
  34.             catch (Exception ex)
  35.             {
  36.                 throw ex;
  37.             }
  38.            
  39.             return result;
  40.         }
Add Comment
Please, Sign In to add comment