Ejemplo n.º 1
0
    //解凍鈕
    protected void btnUnFreeze_Click(object sender, EventArgs e)
    {
        try
        {
            UnSetClinetFocus();

            PIC.VDS2G.VSM.IVM.MaintainCheckOut BCO = new PIC.VDS2G.VSM.IVM.MaintainCheckOut(ConntionDB);
            ParameterList.Clear();

            ParameterList.Add(ViewState["IVM011_Now_Acct_Mon"].ToString()); //0
            ParameterList.Add(int.Parse(ViewState["IVM011_ID"].ToString())); //1
            ParameterList.Add("UnFreeze"); //2
            ParameterList.Add(Session["UID"].ToString());//3
            ParameterList.Add(DateTime.Now); //4

            BCO.UpdCheckOutLog(ParameterList, DBT);

            lblUnFreeze_Date.Text = DateTime.Now.ToString("yyyy/MM/dd");
            ViewState["IVM011_ID"] = null;

            if (lblCheckOut_Date.Text.Trim().Length == 0)
            {
                btnFreeze.Enabled = true;
                btnUnFreeze.Enabled = false;
                btnMonthClose.Enabled = false;
            }
            else
            {
                btnFreeze.Enabled = false;
                btnUnFreeze.Enabled = false;
                btnMonthClose.Enabled = false;
            }
        }
        catch (Exception ex)
        {
            ErrorMsgLabel.Text = ex.Message;
        }
    }
Ejemplo n.º 2
0
    //取得本次月結框的資料
    private void NowCheckoutData()
    {
        int intID;
        DateTime dtFreeze_Date;
        DateTime dtCheckout_Date;
        string strResult;

        string strNowAcctMon = ViewState["IVM011_Now_Acct_Mon"].ToString();

        PIC.VDS2G.VSM.IVM.MaintainCheckOut BCO = new PIC.VDS2G.VSM.IVM.MaintainCheckOut(ConntionDB);
        ParameterList.Clear();

        ParameterList.Add(strNowAcctMon);

        if (BCO.QueryNowCheckOutLog(ParameterList, out intID, out dtFreeze_Date, out dtCheckout_Date))
        {
            btnFreeze.Enabled = false;

            ViewState["IVM011_ID"] = intID;

            if (dtCheckout_Date == DateTime.MinValue)
            {
                lblCheckOut_Date.Text = "";
                btnMonthClose.Enabled = true;
                btnUnFreeze.Enabled = true;
                //20100419拿掉底下那行
                //SetButtonFocus(btnMonthClose.ClientID);
            }
            else
            {
                lblCheckOut_Date.Text = dtCheckout_Date.ToString("yyyy/MM/dd");

                btnMonthClose.Enabled = false;
                btnFreeze.Enabled = true;
                //20100419拿掉底下那行
                //SetButtonFocus(btnFreeze.ClientID);
            }

            if (dtFreeze_Date == DateTime.MinValue)
            {
                lblFreeze_Date.Text = "";
            }
            else
            {
                lblFreeze_Date.Text = dtFreeze_Date.ToString("yyyy/MM/dd");
                //20100419加底下那行
                btnFreeze.Enabled = false;

            }
        }
        else
        {
            btnFreeze.Enabled = true;
            btnMonthClose.Enabled = false;
            btnUnFreeze.Enabled = false;

            SetButtonFocus(btnFreeze.ClientID);
        }
    }
Ejemplo n.º 3
0
    //凍結鈕
    protected void btnFreeze_Click(object sender, EventArgs e)
    {
        try
        {
            UnSetClinetFocus();

            int intID;

            PIC.VDS2G.VSM.IVM.MaintainCheckOut BCO = new PIC.VDS2G.VSM.IVM.MaintainCheckOut(ConntionDB);
            ParameterList.Clear();

            ParameterList.Add(ViewState["IVM011_Now_Acct_Mon"].ToString());
            ParameterList.Add(Session["UID"].ToString());
            ParameterList.Add(DateTime.Now);

            BCO.CreateCheckOutLog(ParameterList, DBT, out intID);

            ViewState["IVM011_ID"] = intID;

            lblFreeze_Date.Text = DateTime.Now.ToString("yyyy/MM/dd");
            lblUnFreeze_Date.Text = "";

            btnFreeze.Enabled = false;
            btnUnFreeze.Enabled = true;
            btnMonthClose.Enabled = true;
        }
        catch (Exception ex)
        {
            ErrorMsgLabel.Text = ex.Message;
        }
    }
Ejemplo n.º 4
0
    //取得前次月結框的資料
    private void PreCheckoutData()
    {
        string strNow_Acct_Mon = string.Empty;
        string strAcct_Mon = string.Empty;
        DateTime dtFreeze_Date;
        DateTime dtUnfreeze_Date;
        DateTime dtCheckout_Date;

        PIC.VDS2G.VSM.IVM.MaintainCheckOut BCO = new PIC.VDS2G.VSM.IVM.MaintainCheckOut(ConntionDB);

        BCO.QueryLastCheckOutLog(out strNow_Acct_Mon, out strAcct_Mon, out dtFreeze_Date, out dtUnfreeze_Date, out dtCheckout_Date);

        lblAcct_Mon_Pre.Text = strAcct_Mon;
        lblFreeze_Date_Pre.Text = dtFreeze_Date.ToString("yyyy/MM/dd");
        lblCheckOut_Date_Pre.Text = dtCheckout_Date.ToString("yyyy/MM/dd");
        lblUnFreeze_Date_Pre.Text = dtUnfreeze_Date.ToString("yyyy/MM/dd");
        lblAcct_Mon.Text = strNow_Acct_Mon;

        ViewState["IVM011_Now_Acct_Mon"] = strNow_Acct_Mon;

    }