예제 #1
0
        public int SaveLeadSource(Entity.Sales.LeadSource Model)
        {
            LeadSourceDbModel DbModel = new LeadSourceDbModel();

            Model.CopyPropertiesTo(DbModel);
            return(LeadSourceDataAccess.SaveLeadSource(DbModel));
        }
예제 #2
0
 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;
     }
 }
예제 #3
0
 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;
     }
 }
예제 #4
0
 public Entity.Sales.LeadSource GetLeadSourceById(int Id)
 {
     Entity.Sales.LeadSource LeadSource = new Entity.Sales.LeadSource();
     LeadSourceDataAccess.GetLeadSourceById(Id).CopyPropertiesTo(LeadSource);
     return(LeadSource);
 }