コード例 #1
0
 public static void InsertCustomer(CustomerFormViewModel viewModel)
 {
     var model = new ECCMaster();
     model.ContactName = viewModel.ContactName;
     model.Organization = viewModel.Organization;
     model.EstimatedCost = viewModel.EstimatedCost;
     model.MiscDetails = viewModel.MiscDetails;
     model.FromDate = viewModel.FromDate;
     model.IDProof = viewModel.IDProof;
     model.IsActive = viewModel.IsActive;
     model.IsSpecial = viewModel.IsSpecial;
     model.NoOfPeople = viewModel.NumOfPeople;
     model.PhoneNumber = viewModel.PhoneNumber;
     model.Purpose = viewModel.Purpose;
     model.RoomDetails = viewModel.RoomDetails;
     model.ToDate = viewModel.ToDate;
     Repository.ECCMasters.InsertOnSubmit(model);
     Repository.SubmitChanges();
 }
 partial void DeleteECCMaster(ECCMaster instance);
 partial void UpdateECCMaster(ECCMaster instance);
 partial void InsertECCMaster(ECCMaster instance);
コード例 #5
0
 public static void DeleteCustomer(ECCMaster model)
 {
     //var model = Repository.ECCMasters.Where(c => c.Organization == organizationName || c.ContactName == contactName).SingleOrDefault();         
     Repository.ECCMasters.DeleteOnSubmit(model);
     Repository.SubmitChanges();            
 }