Esempio n. 1
0
 public bool CardHotMark(string CardNo)
 {
     try
     {
         using (var db = new SoneriCISEntities())
         {
             tbl_Customer_Cards val = new DAL.tbl_Customer_Cards();
             val                  = db.tbl_Customer_Cards.Where(a => a.CardNo == CardNo).FirstOrDefault();
             val.CardNo           = val.CardNo;
             val.CardStatusActive = false;
             val.CardTypeID       = val.CardTypeID;
             val.AccountNo        = val.AccountNo;
             val.WaiveCharges     = val.WaiveCharges;
             val.Salutation       = val.Salutation;
             val.CardTitle        = val.CardTitle;
             val.CardExpiry       = val.CardExpiry;
             val.CardIssuance     = val.CardIssuance;
             val.CIF              = val.CIF;
             db.SaveChanges();
         }
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Esempio n. 2
0
 public bool UpdateCustomerCard(tbl_Customer_Cards row)
 {
     try
     {
         using (var db = new SoneriCISEntities())
         {
             tbl_Customer_Cards val = new DAL.tbl_Customer_Cards();
             val                  = db.tbl_Customer_Cards.Where(a => a.ID == row.ID).FirstOrDefault();
             val.CardNo           = row.CardNo;
             val.CardStatusActive = row.CardStatusActive;
             val.CardTypeID       = row.CardTypeID;
             val.AccountNo        = row.AccountNo;
             val.WaiveCharges     = row.WaiveCharges;
             val.Salutation       = row.Salutation;
             val.CardTitle        = row.CardTitle;
             val.CardExpiry       = row.CardExpiry;
             val.CardIssuance     = row.CardIssuance;
             val.CIF              = row.CIF;
             db.SaveChanges();
         }
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Esempio n. 3
0
 public static bool UpdateCustomerCardType(string CardNo, int?CardTypeId)
 {
     try
     {
         using (var db = new SoneriCISEntities())
         {
             tbl_Customer_Cards val = new DAL.tbl_Customer_Cards();
             val            = db.tbl_Customer_Cards.Where(a => a.CardNo == CardNo).FirstOrDefault();
             val.CardTypeID = CardTypeId;
             db.SaveChanges();
         }
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }