Ejemplo n.º 1
0
    //確認更新(從ALO123<批次調整>回來後做的更新)
    protected void btnConfirm1_Click(object sender, EventArgs e)
    {
        try
        {
            ArrayList ParameterList = new ArrayList();//20091113

            if (ViewState["hidPG_ID"].ToString() == "ALO123")
            {
                ParameterList.Clear();
                ParameterList.Add(PageTimeStamp.Value + Session["UID"].ToString());
                ParameterList.Add(txtDIS_NO.Text); //配本序號
                ParameterList.Add(Request.QueryString["pItem"]); //配本商品品號
                ParameterList.Add(Request.QueryString["pPeriod"]); //配本商品期別
                ParameterList.Add(Request.QueryString["pChanNo"]);
                ParameterList.Add(Session["UID"].ToString()); //登入者
                ParameterList.Add("ALO121"); //V_PG_ID
                BCO.MaintainDisRecord bco = new BCO.MaintainDisRecord(ConnectionDB);
                DataTable dt = new DataTable();
                bco.UpdateDisStoreFromTmp(ParameterList, null);
                lblErrorQ1.Text = "批次更新成功 !!";
                lblErrorQ1.Visible = true;
            }
            if (ViewState["hidGridView_PG_ID"].ToString() == "GridView2")
            {
                ParameterList.Clear();
                ParameterList.Add(PageTimeStamp.Value + Session["UID"].ToString());
                ParameterList.Add(txtDIS_NO.Text); //配本序號
                ParameterList.Add(hidITEM.Value); //配本商品品號
                ParameterList.Add(hidPERIOD.Value); //配本商品期別
                ParameterList.Add(hidChan_No.Value);
                ParameterList.Add(Session["UID"].ToString()); //登入者
                ParameterList.Add("ALO121"); //V_PG_ID
                BCO.MaintainDisRecord bco = new BCO.MaintainDisRecord(ConnectionDB);
                DataTable dt = new DataTable();
                bco.UpdateDisStoreFromTmp(ParameterList, null);
                lblErrorQ1.Text += "<br \\>門市明細更新成功 !!";
                lblErrorQ1.Visible = true;
            }
            get_ZO(txtDIS_NO.Text);
            UpdatePanel3.Update();
            btnConfirm1.Enabled = false;
            ViewState["hidPG_ID"] = "";
            ViewState["hidGridView_PG_ID"] = "";
        }
        catch (Exception ex) { this.lblErrorQ1.Text = ex.Message; lblErrorQ1.Visible = true; }
    }
Ejemplo n.º 2
0
    protected void btn_Save_Click(object sender, EventArgs e)
    {
        #region
        //先更新暫存檔
        SaveCurrentPageDataToDB();
        SaveCurrentPageDataToTmp();

        StringBuilder sb = new StringBuilder();
        try
        {
            ArrayList ParameterList = new ArrayList();
            ParameterList.Clear();
            ParameterList.Add(string.Format("{0}{1}", PageTimeStamp.Value, Session["UID"].ToString()));//無底線
            ParameterList.Add(s_DIS_NO); //配本序號
            ParameterList.Add(s_ITEM);   //品號
            ParameterList.Add(s_PERIOD); //期別
            ParameterList.Add(null);     //通路
            ParameterList.Add(Session["UID"].ToString()); //登入者
            ParameterList.Add(s_WorkId); //V_PG_ID
            ALOModel.MaintainDisRecord BCO = new ALOModel.MaintainDisRecord(ConnectionDB);
            BCO.UpdateDisStoreFromTmp(ParameterList, null);

            Session[s_SessionIDName] = null;//離開前清空
            ScriptManager.RegisterStartupScript(this, this.GetType(), "", "alert('確認更新成功');window.close();", true);
        }
        catch (Exception ex)
        {
            this.ErrorMsgLabel.Text = ex.Message;
            this.UpdatePanel1.Update();
            //ScriptManager.RegisterStartupScript(this, this.GetType(), "", "AlertErroAndSetfocus('" + ex.Message + "','" + iCheck.ToString() + "');", true);
        }
        #endregion
    }
Ejemplo n.º 3
0
    //配量更新
    protected void btnDis_Update_Click(object sender, EventArgs e)
    {
        try
        {
            ArrayList ParameterList = new ArrayList();//20091113

            ParameterList.Clear();
            ParameterList.Add(PageTimeStamp.Value + Session["UID"].ToString());
            ParameterList.Add(txtDIS_NO.Text); //配本序號
            ParameterList.Add(hidITEM.Value); //配本商品品號
            ParameterList.Add(hidPERIOD.Value); //配本商品期別
            ParameterList.Add(hidChan_No.Value);
            ParameterList.Add(Session["UID"].ToString()); //登入者
            ParameterList.Add("ALO122"); //V_PG_ID
            BCO.MaintainDisRecord bco = new BCO.MaintainDisRecord(ConnectionDB);
            DataTable dt = new DataTable();
            bco.UpdateDisStoreFromTmp(ParameterList, null);
            btnDis_Update.Enabled = false;
            lblErrorQ1.Text = "更新成功";
            //更新成功後,畫面上原合計數量 = 調整後的數量,差異量 = 0
            //txtDIS_TOT_QTY.Text = txtDIS_STO_CQTY.Text;
            //txtN_DIS_TOT_QTY.Text = txtN_DIS_TOT_OQTY.Text;
            txtDisSumQty.Text = txtDisSumQty_New.Text;
            txtPageDisQty.Text = txtPageDisQty_New.Text;
            txtDiff.Text = "0";
            UpdatePanel3.Update();
        }
        catch (Exception ex) { this.lblErrorQ1.Text = ex.Message; }
    }