예제 #1
0
        public void UpdateData(SalesMansModel _salesMansModel)
        {
            SalesMansData NewSalesManData = new SalesMansData();

            NewSalesManData = Mapper.Map(_salesMansModel);
            Repository.UpdateData(NewSalesManData);
        }
예제 #2
0
        public void UpdateData(SalesMansData salesMansData)
        {
            using (var db = new AppSalesMan2DbContext())
            {
                var FoundSalesMan = SalesMansDatas.Where(x => x.SalesManID == salesMansData.SalesManID).FirstOrDefault();

                if (FoundSalesMan == null)
                {
                    return;
                }
                #region Mapowanie na SalesManData
                FoundSalesMan.FirstName   = salesMansData.FirstName;
                FoundSalesMan.LastName    = salesMansData.LastName;
                FoundSalesMan.Email       = salesMansData.Email;
                FoundSalesMan.Department  = salesMansData.Department;
                FoundSalesMan.Menager     = salesMansData.Menager;
                FoundSalesMan.Phonenumber = salesMansData.Phonenumber;
                FoundSalesMan.Password    = salesMansData.Password;
                #endregion
                SaveChanges();
            }
        }
예제 #3
0
 public SalesMansModel Map(SalesMansData salesMansData)
 {
     return(_Mapper.Map <SalesMansModel>(salesMansData));
 }