示例#1
0
        public static BllStaff ConvertStaffToBll(StaffWCF wcfStaff)
        {
            BllStaff bllStaff = new BllStaff()
            {
                Login        = wcfStaff.Login,
                Password     = wcfStaff.Password,
                WorkPosition = new BllWorkPosition
                {
                    Id   = wcfStaff.WorkPosition.Id,
                    Name = wcfStaff.WorkPosition.Name
                }
            };

            return(bllStaff);
        }
示例#2
0
        public static StaffWCF ConvertStaffToWcf(BllStaff dTODallStaff)
        {
            StaffWCF wcfStaff = new StaffWCF()
            {
                Login    = dTODallStaff.Login,
                Password = dTODallStaff.Password,

                Id           = dTODallStaff.Id,
                WorkPosition = new WorkPositionWCF {
                    Name = dTODallStaff.WorkPosition.Name,
                    Id   = dTODallStaff.WorkPosition.Id
                },
            };

            return(wcfStaff);
        }
        public StaffWCF GetUserAutorization(string login, string password)
        {
            StaffWCF Staffwcf = null;
            BllStaff staff    = function.GetUserAutorization(login, password);

            if (staff != null)
            {
                Staffwcf = new StaffWCF
                {
                    Login        = staff.Login,
                    Password     = staff.Password,
                    WorkPosition = new WorkPositionWCF
                    {
                        Name = staff.WorkPosition.Name,
                    }
                };
            }
            return(Staffwcf);
        }
 public void AddEmployee(StaffWCF wcfStaff)
 {
     function.AddEmployee(ConvertationsWCF.ConvertStaffToBll(wcfStaff));
 }
        //public void AddBalsam(BalsamWCF balsamWCF)
        //{
        //    addFunctionWCF.AddBalsamToDB(balsamWCF);
        //}

        //public void AddBase(NailBaseWCF nailBaseWCF)
        //{
        //    addFunctionWCF.AddBaseToDB(nailBaseWCF);
        //}

        //public void AddColor(ColorWCF colorWCF)
        //{
        //    addFunctionWCF.AddColorToDB(colorWCF);
        //}

        public void AddEmployee(StaffWCF staffWCF)
        {
            addFunctionWCF.AddEmployee(staffWCF);
        }