예제 #1
0
 public bool UpdateCardRecoveryAmount(int RecoveryID, float Deduction)
 {
     try
     {
         using (var db = new SoneriCISEntities())
         {
             tbl_Card_Charges_Recovery val = new DAL.tbl_Card_Charges_Recovery();
             val                  = db.tbl_Card_Charges_Recovery.Where(a => a.ID == RecoveryID).FirstOrDefault();
             val.CardID           = val.CardID;
             val.ApplicableAmount = val.ApplicableAmount;
             val.ApplicableDate   = val.ApplicableDate;
             val.CardChargesID    = val.CardChargesID;
             //val.DeducatedAmount = Deduction;
             val.DeducatedAmount     = Math.Round(Deduction, 2);
             val.LastDeducationDate  = DateTime.Now;
             val.CardNo              = val.CardNo;
             val.Regional_Charges_ID = val.Regional_Charges_ID;
             val.AccountNo           = val.AccountNo;
             val.AccountCode         = val.AccountCode;
             val.ChargesDescription  = val.ChargesDescription;
             val.IsValid             = val.IsValid;
             db.SaveChanges();
         }
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
예제 #2
0
 public bool UpdateCardRecovery(tbl_Card_Charges_Recovery row)
 {
     try
     {
         using (var db = new SoneriCISEntities())
         {
             tbl_Card_Charges_Recovery val = new DAL.tbl_Card_Charges_Recovery();
             val                     = db.tbl_Card_Charges_Recovery.Where(a => a.ID == row.ID).FirstOrDefault();
             val.CardID              = row.CardID;
             val.ApplicableAmount    = row.ApplicableAmount;
             val.ApplicableDate      = row.ApplicableDate;
             val.CardChargesID       = row.CardChargesID;
             val.DeducatedAmount     = row.DeducatedAmount;
             val.LastDeducationDate  = DateTime.Now;//row.LastDeducationDate;
             val.CardNo              = row.CardNo;
             val.Regional_Charges_ID = row.Regional_Charges_ID;
             val.AccountNo           = row.AccountNo;
             val.AccountCode         = row.AccountCode;
             val.ChargesDescription  = row.ChargesDescription;
             val.IsValid             = row.IsValid;
             db.SaveChanges();
         }
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
예제 #3
0
 public tbl_Card_Charges_Recovery GetCardChargeById(int CardChargeID)
 {
     try
     {
         tbl_Card_Charges_Recovery Val = new DAL.tbl_Card_Charges_Recovery();
         using (var db = new SoneriCISEntities())
         {
             Val = db.tbl_Card_Charges_Recovery.Where(a => a.ID == CardChargeID).FirstOrDefault();
         }
         return(Val);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #4
0
 public bool UpdateLastTransactionDate(int RecoveryID)
 {
     try
     {
         using (var db = new SoneriCISEntities())
         {
             tbl_Card_Charges_Recovery val = new DAL.tbl_Card_Charges_Recovery();
             val = db.tbl_Card_Charges_Recovery.Where(a => a.ID == RecoveryID).FirstOrDefault();
             val.LastDeducationDate = DateTime.Now;
             db.SaveChanges();
         }
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }