public tbl_Request_Customer_Accounts GetRequestCustomerAccountByRequestId(int RequestID)
 {
     try
     {
         tbl_Request_Customer_Accounts imports = new DAL.tbl_Request_Customer_Accounts();
         using (var db = new SoneriCISEntities())
         {
             imports = db.tbl_Request_Customer_Accounts.Where(a => a.RequestID == RequestID).FirstOrDefault();
         }
         return(imports);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public bool UpdateCustomerRequestAccount(int ID, string Address, string Mobile, string Landline)
 {
     try
     {
         using (var db = new SoneriCISEntities())
         {
             tbl_Request_Customer_Accounts val = new DAL.tbl_Request_Customer_Accounts();
             val                     = db.tbl_Request_Customer_Accounts.Where(a => a.ID == ID).FirstOrDefault();
             val.ID                  = val.ID;
             val.AccountNo           = val.AccountNo;
             val.CIF                 = val.CIF;
             val.CardNo              = val.CardNo;
             val.AccountStatusActive = val.AccountStatusActive;
             val.Salutation          = val.Salutation;
             val.AccountTitle        = val.AccountTitle;
             val.Address             = val.Address;
             val.Mobile              = val.Mobile;
             val.DateofBirth         = val.DateofBirth;
             val.MotherMaidenName    = val.MotherMaidenName;
             val.Identification      = val.Identification;
             val.CNIC                = val.CNIC;
             val.AddressType         = val.AddressType;
             val.AccountTypeID       = val.AccountTypeID;
             val.WaiveCharges        = val.WaiveCharges;
             val.PassportNo          = val.PassportNo;
             val.LandlineNo          = val.LandlineNo;
             val.Email               = val.Email;
             val.Nationality         = val.Nationality;
             val.AccountCategoryCode = val.AccountCategoryCode;
             val.PhoneOffice         = val.PhoneOffice;
             val.Company             = val.Company;
             val.IdentificationType  = val.IdentificationType;
             val.Mobile2             = val.Mobile2;
             val.Address2            = val.Address2;
             val.Address3            = val.Address3;
             val.MainMobile          = Mobile;
             val.MainLandline        = Landline;
             val.MainAddress         = Address;
             db.SaveChanges();
         }
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
 public bool UpdateCustomerRequestAccountOnAuthorization(int RequestID, string Address, string Mobile, string Landline, string OfficeNo)
 {
     try
     {
         using (var db = new SoneriCISEntities())
         {
             tbl_Request_Customer_Accounts val = new DAL.tbl_Request_Customer_Accounts();
             val              = db.tbl_Request_Customer_Accounts.Where(a => a.RequestID == RequestID).OrderByDescending(a => a.ID).FirstOrDefault();
             val.Mobile2      = Mobile;
             val.MainLandline = Landline;
             val.Address2     = Address;
             val.Company      = OfficeNo;
             db.SaveChanges();
         }
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }