Exemplo n.º 1
0
        /// <summary>
        /// 取消已生成的导购人员导购工资
        /// 是(值为1):取消工资;否(值为2):未取消工资
        /// </summary>
        /// <param name="SalaryDetailID">工资明细ID</param>
        /// <param name="DeleteStaff">取消人ID</param>
        /// <returns></returns>
        public static int CancelSalaryDetail(int SalaryDetailID, int DeleteStaff)
        {
            PM_SalaryDAL    dal    = (PM_SalaryDAL)DataAccess.CreateObject(DALClassName);
            PM_SalaryDetail detail = dal.GetDetailModel(SalaryDetailID);

            detail["FlagCancel"] = "1";
            Org_Staff staff = new Org_StaffBLL(DeleteStaff).Model;

            detail["DeleteStaff"]    = staff.RealName;
            detail["DeleteTime"]     = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            detail["DeletePosition"] = new Org_PositionBLL(staff.Position).Model.Name;
            dal.HeadID = detail.SalaryID;
            string a = detail.SalaryID + "|" + detail["FlagCancel"] + "|" + detail["DeleteTime"] + "|" + detail["DeleteStaff"] + "|" + detail["DeletePosition"];

            return(dal.UpdateDetail(detail));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 导出工行和建行工资表所需数据
        /// </summary>
        /// <param name="AccountMonth"></param>
        /// <param name="OrganizeCity"></param>
        /// <param name="BankCode">银行代码:1:农行;2:建行</param>
        /// <param name="Remark">到处单中的备注</param>
        /// <returns></returns>
        public static DataTable Salary_Table_Export(int AccountMonth, int OrganizeCity, int BankCode, string Remark)
        {
            PM_SalaryDAL dal = (PM_SalaryDAL)DataAccess.CreateObject(DALClassName);

            try
            {
                SqlDataReader rd    = dal.PM_Salary_Export(AccountMonth, OrganizeCity, BankCode);
                DataTable     table = Tools.ConvertDataReaderToDataTable(rd);
                table.Columns.Add("Index", typeof(System.Int32));
                table.Columns["Index"].SetOrdinal(0);
                table.Columns.Add("Remark", typeof(System.String));
                for (int i = 0; i < table.Rows.Count; i++)
                {
                    DataRow row = table.Rows[i];
                    row["Index"]  = i + 1;
                    row["Remark"] = Remark;
                }
                return(table);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 获取促销员工资申请单的总金额
        /// </summary>
        /// <param name="detailid"></param>
        /// <returns></returns>
        public static decimal GetSumSalary(int ID)
        {
            PM_SalaryDAL dal = (PM_SalaryDAL)DataAccess.CreateObject(DALClassName);

            return(dal.GetSumSalary(ID));
        }
Exemplo n.º 4
0
        public static DataTable GetSummaryTotal(int AccountMonth, int OrganizeCity, int Level, int State, int Staff, int SalaryClassify)
        {
            PM_SalaryDAL dal = (PM_SalaryDAL)DataAccess.CreateObject(DALClassName);

            return(Tools.ConvertDataReaderToDataTable(dal.GetSummaryTotal(AccountMonth, OrganizeCity, Level, State, Staff, SalaryClassify)));
        }
Exemplo n.º 5
0
        public static DataTable GetDetailByState(int AccountMonth, int OrganizeCity, int Level, int State, int Staff, int SalaryClassify, int RTChannel)
        {
            PM_SalaryDAL dal = (PM_SalaryDAL)DataAccess.CreateObject(DALClassName);

            return(Tools.ConvertDataReaderToDataTable(dal.GetDetailByState(AccountMonth, OrganizeCity, Level, State, Staff, SalaryClassify, RTChannel)));
        }
Exemplo n.º 6
0
        public static int Merge(int AccountMonth, string SalaryIDs, int Staff)
        {
            PM_SalaryDAL dal = (PM_SalaryDAL)DataAccess.CreateObject(DALClassName);

            return(dal.Merge(AccountMonth, SalaryIDs, Staff));
        }
Exemplo n.º 7
0
        public static decimal ComputeIncomeTax(decimal Income)
        {
            PM_SalaryDAL dal = (PM_SalaryDAL)DataAccess.CreateObject(DALClassName);

            return(dal.ComputeIncomeTax(Income));
        }
Exemplo n.º 8
0
        public static void UpdateAdjustRecord(int ID, int Staff, string OldAdjustCost, string AdjustCost, string promotorName)
        {
            PM_SalaryDAL dal = (PM_SalaryDAL)DataAccess.CreateObject(DALClassName);

            dal.UpdateAdjustRecord(ID, Staff, OldAdjustCost, AdjustCost, promotorName);
        }
Exemplo n.º 9
0
        public static int PM_Salary_GetStateByPromotor(int promotor, int accountmonth)
        {
            PM_SalaryDAL dal = (PM_SalaryDAL)DataAccess.CreateObject(DALClassName);

            return(dal.PM_Salary_GetStateByPromotor(promotor, accountmonth));
        }
Exemplo n.º 10
0
        /// <summary>
        /// 根据工资计算方式计算奖金 1:最终系数值计算 2:分段累加计算
        /// </summary>
        /// <param name="SalesTarget"></param>
        /// <param name="ActSalesVolume"></param>
        /// <param name="ComputMethd"></param>
        /// <returns></returns>
        public static decimal PM_Salary_ComputeBonus(int Promotor, int AccountMonth, decimal SalesActual, decimal ActComplete)
        {
            PM_SalaryDAL dal = (PM_SalaryDAL)DataAccess.CreateObject(DALClassName);

            return(dal.PM_Salary_ComputeBonus(Promotor, AccountMonth, SalesActual, ActComplete));
        }
Exemplo n.º 11
0
        /// <summary>
        /// 获取实际销量数量或金额
        /// </summary>
        /// <param name="AccountMonth"></param>
        /// <param name="Promotor"></param>
        /// <returns></returns>
        public static DataTable PM_Salary_GetActSalesVolume(int AccountMonth, int Promotor)
        {
            PM_SalaryDAL dal = (PM_SalaryDAL)DataAccess.CreateObject(DALClassName);

            return(Tools.ConvertDataReaderToDataTable(dal.PM_Salary_GetActSalesVolume(AccountMonth, Promotor)));
        }
Exemplo n.º 12
0
 public PM_SalaryBLL(int id, bool bycache)
     : base(DALClassName)
 {
     _dal = (PM_SalaryDAL)_DAL;
     FillModel(id, bycache);
 }
Exemplo n.º 13
0
 public PM_SalaryBLL(int id)
     : base(DALClassName)
 {
     _dal = (PM_SalaryDAL)_DAL;
     FillModel(id);
 }
Exemplo n.º 14
0
 ///<summary>
 ///PM_SalaryBLL
 ///</summary>
 public PM_SalaryBLL()
     : base(DALClassName)
 {
     _dal = (PM_SalaryDAL)_DAL;
     _m   = new PM_Salary();
 }