Esempio n. 1
0
 //铜材加工价格表--修改、删除
 protected void Gridview4_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "Cody")//修改
     {
         GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
         Gridview4.SelectedIndex     = row.RowIndex;
         label_CopperPriceID.Text    = e.CommandArgument.ToString();
         label_CopperPrice.Text      = "修改";
         TextBox16.Text              = Gridview4.Rows[Gridview4.SelectedIndex].Cells[1].Text.ToString();
         TextBox17.Text              = Gridview4.Rows[Gridview4.SelectedIndex].Cells[2].Text.ToString();
         TextBox19.Text              = Gridview4.Rows[Gridview4.SelectedIndex].Cells[3].Text.ToString();
         TextBox20.Text              = Gridview4.Rows[Gridview4.SelectedIndex].Cells[4].Text.ToString();
         TextBox21.Text              = Gridview4.Rows[Gridview4.SelectedIndex].Cells[5].Text.ToString();
         TextBox15.Text              = Gridview4.Rows[Gridview4.SelectedIndex].Cells[8].Text.ToString();
         DropDownList1.SelectedValue = Gridview4.Rows[Gridview4.SelectedIndex].Cells[7].Text.ToString();
         Panel_CopperPrice.Visible   = true;
         UpdatePanel_CopperPrice.Update();
     }
     if (e.CommandName == "Boly")//删除
     {
         GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
         Gridview4.SelectedIndex     = row.RowIndex;
         label_CopperPriceID.Text    = e.CommandArgument.ToString();
         PMCopperFoundryinfo.PMCP_ID = new Guid(e.CommandArgument.ToString());
         pf.DeletePMCopperProcess(PMCopperFoundryinfo);
         PMCopperFoundryinfo.PMCF_ID = new Guid(label_CopperID.Text);
         BindGridview4(PMCopperFoundryinfo);
         Panel2.Visible = true;
         UpdatePanel2.Update();
         ScriptManager.RegisterClientScriptBlock(UpdatePanel2, GetType(), "aa", "alert('删除成功!')", true);
         return;
     }
 }
Esempio n. 2
0
 //取消铜材加工
 protected void Button_CPrice(object sender, EventArgs e)
 {
     Panel2.Visible = false;
     UpdatePanel2.Update();
     Panel_CopperPrice.Visible = false;
     UpdatePanel_CopperPrice.Update();
 }
Esempio n. 3
0
 //取消加工价格
 protected void Button_CMeky(object sender, EventArgs e)
 {
     TextBox16.Text = "";
     TextBox17.Text = "";
     TextBox19.Text = "";
     TextBox20.Text = "";
     TextBox21.Text = "";
     TextBox15.Text = "";
     DropDownList1.SelectedValue = "请选择";
     Panel_CopperPrice.Visible   = false;
     UpdatePanel_CopperPrice.Update();
 }
Esempio n. 4
0
    //检索
    protected void Button1_Sh(object sender, EventArgs e)
    {
        string condition = GetCondition();

        BindGridview1(condition);
        UpdatePanel_Copper.Update();
        Panel_CopperNew.Visible = false;
        UpdatePanel_CopperNew.Update();
        Panel_Supply.Visible = false;
        UpdatePanel_Supply.Update();
        Panel_CopperIn.Visible = false;
        UpdatePanel_CopperIn.Update();
        Panel1.Visible = false;
        UpdatePanel1.Update();
        Panel2.Visible = false;
        UpdatePanel2.Update();
        Panel_CopperInNew.Visible = false;
        UpdatePanel_CopperInNew.Update();
        Panel_CopperReturn.Visible = false;
        UpdatePane_CopperReturn.Update();
        Panel_CopperPrice.Visible = false;
        UpdatePanel_CopperPrice.Update();
    }
Esempio n. 5
0
 //提交加工价格
 protected void Button_Meky(object sender, EventArgs e)
 {
     if (TextBox16.Text != "")
     {
         PMCopperFoundryinfo.PMCP_CopperPrice = Convert.ToDecimal(TextBox16.Text);
     }
     else
     {
         ScriptManager.RegisterClientScriptBlock(UpdatePanel_CopperPrice, GetType(), "aa", "alert('标记*的为必填项,请填写完整!')", true);
         return;
     }
     if (TextBox17.Text != "")
     {
         PMCopperFoundryinfo.PMCP_CopperDiscountRate = Convert.ToDecimal(TextBox17.Text);
     }
     else
     {
         ScriptManager.RegisterClientScriptBlock(UpdatePanel_CopperPrice, GetType(), "aa", "alert('标记*的为必填项,请填写完整!')", true);
         return;
     }
     if (TextBox19.Text != "")
     {
         PMCopperFoundryinfo.PMCP_ZnPrice = Convert.ToDecimal(TextBox19.Text);
     }
     else
     {
         ScriptManager.RegisterClientScriptBlock(UpdatePanel_CopperPrice, GetType(), "aa", "alert('标记*的为必填项,请填写完整!')", true);
         return;
     }
     if (TextBox20.Text != "")
     {
         PMCopperFoundryinfo.PMCP_ZnDiscountRate = Convert.ToDecimal(TextBox20.Text);
     }
     else
     {
         ScriptManager.RegisterClientScriptBlock(UpdatePanel_CopperPrice, GetType(), "aa", "alert('标记*的为必填项,请填写完整!')", true);
         return;
     }
     if (TextBox21.Text != "")
     {
         PMCopperFoundryinfo.PMCP_ProcessCost = Convert.ToDecimal(TextBox21.Text);
     }
     else
     {
         ScriptManager.RegisterClientScriptBlock(UpdatePanel_CopperPrice, GetType(), "aa", "alert('标记*的为必填项,请填写完整!')", true);
         return;
     }
     if (TextBox15.Text != "")
     {
         PMCopperFoundryinfo.PMCP_AccountRate = Convert.ToDecimal(TextBox15.Text);
     }
     else
     {
         ScriptManager.RegisterClientScriptBlock(UpdatePanel_CopperPrice, GetType(), "aa", "alert('标记*的为必填项,请填写完整!')", true);
         return;
     }
     if (DropDownList1.SelectedValue != "请选择")
     {
         PMCopperFoundryinfo.PMCP_NowPrice = DropDownList1.SelectedValue.ToString();
     }
     else
     {
         ScriptManager.RegisterClientScriptBlock(UpdatePanel_CopperPrice, GetType(), "aa", "alert('标记*的为必填项,请填写完整!')", true);
         return;
     }
     PMCopperFoundryinfo.PMCF_ID = new Guid(label_CopperID.Text);
     if (label_CopperPrice.Text == "新增")
     {
         PMCopperFoundryinfo.PMCP_MakeMan = Session["UserName"].ToString();
         pf.InsertPMCopperProcess(PMCopperFoundryinfo);
     }
     if (label_CopperPrice.Text == "修改")
     {
         PMCopperFoundryinfo.PMCP_ID = new Guid(label_CopperPriceID.Text);
         pf.UpdatePMCopperProcess(PMCopperFoundryinfo);
     }
     TextBox16.Text = "";
     TextBox17.Text = "";
     TextBox19.Text = "";
     TextBox20.Text = "";
     TextBox21.Text = "";
     TextBox15.Text = "";
     DropDownList1.SelectedValue = "请选择";
     Panel_CopperPrice.Visible   = false;
     UpdatePanel_CopperPrice.Update();
     PMCopperFoundryinfo.PMCF_ID = new Guid(label_CopperID.Text);
     BindGridview4(PMCopperFoundryinfo);
     UpdatePanel2.Update();
 }
Esempio n. 6
0
 //新增铜材加工价格
 protected void Button_Price(object sender, EventArgs e)
 {
     label_CopperPrice.Text    = "新增";
     Panel_CopperPrice.Visible = true;
     UpdatePanel_CopperPrice.Update();
 }