public int SaveLeadSource(Entity.Sales.LeadSource Model) { LeadSourceDbModel DbModel = new LeadSourceDbModel(); Model.CopyPropertiesTo(DbModel); return(LeadSourceDataAccess.SaveLeadSource(DbModel)); }
private void Save() { if (LeadSourceStatusControlValidation()) { Business.Sales.LeadSource Obj = new Business.Sales.LeadSource(); Entity.Sales.LeadSource Model = new Entity.Sales.LeadSource { Id = LeadSourceId, Name = txtName.Text, Description = txtDescription.Text, }; int rows = Obj.SaveLeadSource(Model); if (rows > 0) { ClearControls(); LoadLeadSourceList(); LeadSourceId = 0; Message.IsSuccess = true; Message.Text = "Saved Successfully"; } else { Message.IsSuccess = false; Message.Text = "Unable to save data."; } Message.Show = true; } }
private void GetLeadSourceById() { Business.Sales.LeadSource Obj = new Business.Sales.LeadSource(); Entity.Sales.LeadSource LeadSource = Obj.GetLeadSourceById(LeadSourceId); if (LeadSource.Id != 0) { txtDescription.Text = LeadSource.Description; txtName.Text = LeadSource.Name; } }
public Entity.Sales.LeadSource GetLeadSourceById(int Id) { Entity.Sales.LeadSource LeadSource = new Entity.Sales.LeadSource(); LeadSourceDataAccess.GetLeadSourceById(Id).CopyPropertiesTo(LeadSource); return(LeadSource); }