예제 #1
0
 public tbl_Regional_Charges GetRegionalCharges(int CardChargeID, int RegionID)
 {
     try
     {
         tbl_Regional_Charges Val = new DAL.tbl_Regional_Charges();
         using (var db = new SoneriCISEntities())
         {
             Val = db.tbl_Regional_Charges.Where(a => a.CardChargeID == CardChargeID && a.RegionID == RegionID).FirstOrDefault();
         }
         return(Val);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #2
0
 public bool UpdateRegionalCharges(tbl_Regional_Charges row)
 {
     try
     {
         using (var db = new SoneriCISEntities())
         {
             tbl_Regional_Charges val = new DAL.tbl_Regional_Charges();
             val = db.tbl_Regional_Charges.Where(a => a.ID == row.ID).FirstOrDefault();
             val.PercentageAmount = row.PercentageAmount;
             val.RegionID         = row.RegionID;
             val.CardChargeID     = row.CardChargeID;
             val.TotalAmount      = row.TotalAmount;
             db.SaveChanges();
         }
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }