Пример #1
0
        /// <summary>
        /// 保存薪酬标准
        /// </summary>
        /// <param name="salaryStandard">需要保存的薪酬标准</param>
        /// <returns>是否成功</returns>
        public bool SaveSalaryStandard(SalaryStandard salaryStandard)
        {
            //throw new NotImplementedException();

            ISalaryStandardDAL dAL = new SalaryStandardDAL();

            if (dAL.QueryById(salaryStandard.Id) != null)
            {
                if (dAL.Update(salaryStandard) > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                if (dAL.Add(salaryStandard) > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
        }
Пример #2
0
        /// <summary>
        /// 通过id获取薪酬标准
        /// </summary>
        /// <param name="id">主键id</param>
        /// <returns>返回id对应的薪酬标准对象</returns>
        public SalaryStandard GetSalaryStandardById(int id)
        {
            //throw new NotImplementedException();

            ISalaryStandardDAL dAL = new SalaryStandardDAL();

            return(dAL.QueryById(id));
        }
Пример #3
0
        /// <summary>
        /// 通过薪酬标准的编号获取薪酬标准的id
        /// </summary>
        /// <param name="fileNumber">编号</param>
        /// <returns>薪酬标准的id</returns>
        public int GetSalaryStandardIdByfileNumber(string fileNumber)
        {
            //throw new NotImplementedException();

            ISalaryStandardDAL dAL = new SalaryStandardDAL();

            return(dAL.GetStandardIdByFileNumber(fileNumber));
        }
Пример #4
0
        public List <SalaryStandard> GetAllSalaryStandardByKeyword(string keyword)
        {
            //throw new NotImplementedException();

            ISalaryStandardDAL dAL = new SalaryStandardDAL();

            return(dAL.GetAllSalaryStandardByKeyword(keyword));
        }
Пример #5
0
        /// <summary>
        /// 获取所有待复核的薪酬标准
        /// </summary>
        /// <returns>List类型,所有的待复核的薪酬标准</returns>
        public List <SalaryStandard> GetAllSalaryStandardWaitCheck()
        {
            //throw new NotImplementedException();

            ISalaryStandardDAL dAL = new SalaryStandardDAL();

            return(dAL.GetAllSalaryStandardWaitCheck());
        }
Пример #6
0
        /// <summary>
        /// 通过id删除薪酬标准
        /// </summary>
        /// <param name="id">主键id</param>
        /// <returns>是否成功</returns>
        public bool DeleteSalaryStandard(int id)
        {
            //throw new NotImplementedException();

            ISalaryStandardDAL dAL = new SalaryStandardDAL();

            if (dAL.DeleteSalaryStandard(id) > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #7
0
        static void Main(string[] args)
        {
            #region 测试SecondOrgDAL,测试成功
            //ISecondOrgDAL dAL = new SecondOrgDAL();

            //foreach (var so in dAL.Query())
            //{
            //    Console.WriteLine(so.Id);
            //    Console.WriteLine(so.OrgName);
            //    Console.WriteLine(so.OrgLevel);
            //    Console.WriteLine(so.ParentOrgId);
            //}

            //ISecondOrgDAL dAL = new SecondOrgDAL();
            //foreach (var fo in dAL.QueryByParentOrgId(10))
            //{
            //    Console.WriteLine(fo.Id);
            //    Console.WriteLine(fo.OrgName);
            //}
            //Console.ReadKey();

            //Console.ReadKey();
            #endregion

            #region 测试ThirdOrgDAL,测试成功
            //IThirdOrgDAL dAL = new ThirdOrgDAL();
            //foreach (var to in dAL.Query())
            //{
            //    Console.WriteLine(to.Id);
            //    Console.WriteLine(to.OrgName);
            //    Console.WriteLine(to.OrgLevel);
            //    Console.WriteLine(to.ParentOrgId);
            //}
            //Console.ReadKey();

            //IThirdOrgDAL dAL = new ThirdOrgDAL();
            //foreach (var so in dAL.QueryByParentOrgId(10))
            //{
            //    Console.WriteLine(so.Id);
            //    Console.WriteLine(so.OrgName);
            //}
            //Console.ReadKey();

            #endregion

            #region 测试FirstOrgDAL
            //IFirstOrgDAL dAL = new FirstOrgDAL();
            //FirstOrg firstOrg = dAL.QueryById(10);
            //Console.WriteLine(firstOrg.OrgName);
            //Console.ReadKey();
            #endregion

            #region 测试OccupationClassDAL
            //IOccupationClassDAL dAL = new OccupationClassDAL();
            //foreach (var oc in dAL.Query())
            //{
            //    Console.WriteLine(oc.Id);
            //    Console.WriteLine(oc.Name);
            //}
            //Console.ReadKey();

            //Console.WriteLine(dAL.QueryById(1).Name);
            //Console.ReadKey();
            #endregion

            #region 测试TechnicalTitleDAL
            //ITechnicalTitleDAL dAL = new TechnicalTitleDAL();
            //foreach (var tt in dAL.Query())
            //{
            //    Console.WriteLine(tt.Id);
            //    Console.WriteLine(tt.Name);
            //}
            //Console.ReadKey();
            #endregion

            #region 测试SalaryStandardDAL,测试成功
            //ISalaryStandardDAL dAL = new SalaryStandardDAL();
            //Console.WriteLine(dAL.Add(new SalaryStandard { StandardName = "测试", StandardFileNumber = "ceshi", Registrant = "测试人", RegistTime = DateTime.Now, DesignBy = "测试人", Total = 3200 }));
            //Console.ReadKey();
            #endregion

            #region 测试StandardMapItemDAL
            //IStandardMapItemDAL dAL = new StandardMapItemDAL();
            //StandardMapItem standardMapItem = dAL.QueryById(1);
            //Console.WriteLine(standardMapItem.StandardId);
            //Console.ReadKey();
            #endregion

            #region 测试StandardMapItemDAL
            //IStandardMapItemDAL dAL = new StandardMapItemDAL();
            //Console.WriteLine(dAL.GetStandardMapItemByStandardAndItem(1, 2).Id);
            //Console.ReadKey();
            #endregion

            ISalaryStandardDAL dAL = new SalaryStandardDAL();
            Console.WriteLine(dAL.GetStandardIdByFileNumber("fsdjkfhkash"));
            Console.ReadKey();
        }