예제 #1
0
    private void DoAuditExit(string YearMonth, int depid, int pici, DataTable dt, int prid)
    {
        BG_MonPayPlanRemark mppr = BG_MonPayPlanRemarkManager.GetBG_MonPayPlanRemarkByPRID(prid);

        mppr.MASta   = "审核不通过";
        mppr.MACause = txtReason.Text;
        BG_MonPayPlanRemarkManager.ModifyBG_MonPayPlanRemark(mppr);

        DataTable paydt = BG_MonPayPlanGenerateLogic.GetMonPayTimepici(YearMonth, depid, common.IntSafeConvert(cmbpici.SelectedItem.Text));

        for (int i = 0; i < paydt.Rows.Count; i++)
        {
            BG_MonPayPlan_His bgMonPayPlanHis = new BG_MonPayPlan_His();
            bgMonPayPlanHis.CPID              = common.IntSafeConvert(paydt.Rows[i]["CPID"]);
            bgMonPayPlanHis.DeptID            = depid;
            bgMonPayPlanHis.MPFunding         = ParseUtil.ToDecimal(paydt.Rows[i]["MPFunding"].ToString(), 0);
            bgMonPayPlanHis.MPPHisTime        = DateTime.Now;
            bgMonPayPlanHis.PIID              = common.IntSafeConvert(paydt.Rows[i]["PIID"]);
            bgMonPayPlanHis.MPRemark          = "审核不通过";
            bgMonPayPlanHis.MPFundingAdd      = ParseUtil.ToDecimal(paydt.Rows[i]["MPFundingAdd"].ToString(), 0);
            bgMonPayPlanHis.MPTime            = Convert.ToDateTime(paydt.Rows[i]["MPTime"]);
            bgMonPayPlanHis.MPFundingAddTimes = common.IntSafeConvert(paydt.Rows[i]["MPFundingAddTimes"]);
            BG_MonPayPlan_HisManager.AddBG_MonPayPlan_His(bgMonPayPlanHis);
        }
    }
    private void DoAudit(string YearMonth, int depid, int pici, int prid)
    {
        BG_MonPayPlanRemark mppr = BG_MonPayPlanRemarkManager.GetBG_MonPayPlanRemarkByPRID(prid);

        mppr.MASta = "提交";
        BG_MonPayPlanRemarkManager.ModifyBG_MonPayPlanRemark(mppr);
    }
예제 #3
0
    private static void DoAudit(string YearMonth, int depid, int pici, DataTable dt, int prid)
    {
        BG_MonPayPlanRemark mppr = BG_MonPayPlanRemarkManager.GetBG_MonPayPlanRemarkByPRID(prid);

        mppr.MASta = "审核通过";
        if (BG_MonPayPlanRemarkManager.ModifyBG_MonPayPlanRemark(mppr))
        {
            DataTable paydt = BG_MonPayPlanGenerateLogic.GetMonPayTimepici(YearMonth, depid, pici);
            for (int i = 0; i < paydt.Rows.Count; i++)
            {
                BG_MonPayPlan_His bgMonPayPlanHis = new BG_MonPayPlan_His();
                bgMonPayPlanHis.CPID              = common.IntSafeConvert(paydt.Rows[i]["CPID"]);
                bgMonPayPlanHis.DeptID            = depid;
                bgMonPayPlanHis.MPFunding         = ParseUtil.ToDecimal(paydt.Rows[i]["MPFunding"].ToString(), 0);
                bgMonPayPlanHis.MPPHisTime        = DateTime.Now;
                bgMonPayPlanHis.PIID              = common.IntSafeConvert(paydt.Rows[i]["PIID"]);
                bgMonPayPlanHis.MPRemark          = "审核通过";
                bgMonPayPlanHis.MPFundingAdd      = ParseUtil.ToDecimal(paydt.Rows[i]["MPFundingAdd"].ToString(), 0);
                bgMonPayPlanHis.MPTime            = Convert.ToDateTime(paydt.Rows[i]["MPTime"]);
                bgMonPayPlanHis.MPFundingAddTimes = common.IntSafeConvert(paydt.Rows[i]["MPFundingAddTimes"]);
                BG_MonPayPlan_HisManager.AddBG_MonPayPlan_His(bgMonPayPlanHis);
            }
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                int CashierID = BG_CashierLogic.GetCashierIDAudit_RemarkByPiid(depid, YearMonth,
                                                                               common.IntSafeConvert(dt.Rows[i]["PIID"]));
                if (CashierID > 0)
                {
                    BG_Cashier bgCashier = BG_CashierManager.GetBG_CashierByCashierid(CashierID);
                    bgCashier.BQMon          += ParToDecimal.ParToDel(dt.Rows[i]["MPFundingAdd"].ToString());
                    bgCashier.BgMon          += ParToDecimal.ParToDel(dt.Rows[i]["MPFundingAdd"].ToString());
                    bgCashier.CashierBalance += ParToDecimal.ParToDel(dt.Rows[i]["MPFundingAdd"].ToString());
                    bgCashier.CZMon           = 0;
                    bgCashier.QTMon           = 0;
                    bgCashier.CTime           = mppr.MATime;
                    bgCashier.Piid            = common.IntSafeConvert(dt.Rows[i]["PIID"]);
                    bgCashier.DepID           = mppr.DeptID;
                    BG_CashierManager.ModifyBG_Cashier(bgCashier);
                }
                else
                {
                    BG_Cashier bgCashier = new BG_Cashier();
                    bgCashier.BQMon          += ParToDecimal.ParToDel(dt.Rows[i]["MPFundingAdd"].ToString());
                    bgCashier.BgMon          += ParToDecimal.ParToDel(dt.Rows[i]["MPFundingAdd"].ToString());
                    bgCashier.CashierBalance += ParToDecimal.ParToDel(dt.Rows[i]["MPFundingAdd"].ToString());
                    bgCashier.CZMon           = 0;
                    bgCashier.QTMon           = 0;
                    bgCashier.CTime           = mppr.MATime;
                    bgCashier.Piid            = common.IntSafeConvert(dt.Rows[i]["PIID"]);
                    bgCashier.DepID           = mppr.DeptID;
                    BG_CashierManager.AddBG_Cashier(bgCashier);
                }
            }
        }
    }