Beispiel #1
0
    //提交供应商
    protected void Button_ComSP(object sender, EventArgs e)
    {
        string Pname;
        bool   temp = false;

        foreach (GridViewRow item in Gridview_PMSupply.Rows)
        {
            RadioButton rb = item.FindControl("RadioButtonMarkup") as RadioButton;

            if (rb.Checked)
            {
                Pname = Gridview_PMSupply.Rows[item.RowIndex].Cells[3].Text.ToString();
                temp  = true;
                label_SupplyID.Text = Gridview_PMSupply.DataKeys[item.RowIndex].Value.ToString();
                TextBox6.Text       = Pname;
                UpdatePanel_CopperNew.Update();
            }
        }
        if (!temp)
        {
            ScriptManager.RegisterClientScriptBlock(UpdatePanel_Supply, GetType(), "aa", "alert('请选择供应商')", true);
            return;
        }
        else
        {
            Panel_Supply.Visible = false;
            UpdatePanel_Supply.Update();
        }
    }
Beispiel #2
0
 //取消填写铜材代工
 protected void Button_Cancel(object sender, EventArgs e)
 {
     TextBox4.Text           = "";
     TextBox3.Text           = "";
     TextBox6.Text           = "";
     TextBox5.Text           = "";
     Panel_CopperNew.Visible = false;
     UpdatePanel_CopperNew.Update();
 }
Beispiel #3
0
 //提交铜材代工表
 protected void Button1_Com1(object sender, EventArgs e)
 {
     if (TextBox4.Text != "")
     {
         PMCopperFoundryinfo.PMCF_MaterialName = TextBox4.Text;
     }
     else
     {
         ScriptManager.RegisterClientScriptBlock(UpdatePanel_CopperNew, GetType(), "alert", "alert('标记*的为必填项,请填写完整!')", true);
         return;
     }
     if (TextBox3.Text != "")
     {
         PMCopperFoundryinfo.PMCF_ReturnTotalNum = Convert.ToDecimal(TextBox3.Text);
     }
     else
     {
         ScriptManager.RegisterClientScriptBlock(UpdatePanel_CopperNew, GetType(), "alert", "alert('标记*的为必填项,请填写完整!')", true);
         return;
     }
     if (TextBox5.Text != "")
     {
         PMCopperFoundryinfo.PMCF_InTotalNum = Convert.ToDecimal(TextBox5.Text);
     }
     else
     {
         ScriptManager.RegisterClientScriptBlock(UpdatePanel_CopperNew, GetType(), "alert", "alert('标记*的为必填项,请填写完整!')", true);
         return;
     }
     if (TextBox6.Text != "")
     {
         PMCopperFoundryinfo.PMSI_ID = new Guid(label_SupplyID.Text);
     }
     else
     {
         ScriptManager.RegisterClientScriptBlock(UpdatePanel_CopperNew, GetType(), "alert", "alert('标记*的为必填项,请填写完整!')", true);
         return;
     }
     if (label_New.Text == "新增铜材代工表")
     {
         pf.InsertPMCopperFoundry(PMCopperFoundryinfo);
     }
     else
     {
         PMCopperFoundryinfo.PMCF_ID = new Guid(label_CopperID.Text);
         pf.UpdatePMCopperFoundry(PMCopperFoundryinfo);
     }
     TextBox4.Text           = "";
     TextBox3.Text           = "";
     TextBox6.Text           = "";
     TextBox5.Text           = "";
     Panel_CopperNew.Visible = false;
     UpdatePanel_CopperNew.Update();
     BindGridview1("");
     UpdatePanel_Copper.Update();
 }
Beispiel #4
0
 //铜材代工表的修改、正料、退料、加工
 protected void Gridview1_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "Mody")//修改
     {
         GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
         Gridview1.SelectedIndex = row.RowIndex;
         label_CopperID.Text     = e.CommandArgument.ToString();
         label_New.Text          = Gridview1.Rows[row.RowIndex].Cells[1].Text.ToString() + "   " + Gridview1.Rows[row.RowIndex].Cells[2].Text.ToString() + "   " + Gridview1.Rows[row.RowIndex].Cells[3].Text.ToString();
         TextBox4.Text           = Gridview1.Rows[row.RowIndex].Cells[3].Text.ToString();
         TextBox3.Text           = Gridview1.Rows[row.RowIndex].Cells[4].Text.ToString();
         TextBox5.Text           = Gridview1.Rows[row.RowIndex].Cells[5].Text.ToString();
         TextBox6.Text           = Gridview1.Rows[row.RowIndex].Cells[2].Text.ToString();
         label_SupplyID.Text     = Gridview1.Rows[row.RowIndex].Cells[12].Text.ToString();
         Panel_CopperNew.Visible = true;
         UpdatePanel_CopperNew.Update();
     }
     if (e.CommandName == "CopperIn")//正料
     {
         GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
         Gridview1.SelectedIndex     = row.RowIndex;
         label_CopperID.Text         = e.CommandArgument.ToString();
         PMCopperFoundryinfo.PMCF_ID = new Guid(label_CopperID.Text);
         BindGridview2(PMCopperFoundryinfo);
         label13.Text           = Gridview1.Rows[row.RowIndex].Cells[1].Text.ToString() + "   " + Gridview1.Rows[row.RowIndex].Cells[2].Text.ToString() + "   " + Gridview1.Rows[row.RowIndex].Cells[3].Text.ToString();
         Panel_CopperIn.Visible = true;
         UpdatePanel_CopperIn.Update();
     }
     if (e.CommandName == "Return")//退料
     {
         GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
         Gridview1.SelectedIndex     = row.RowIndex;
         label_CopperID.Text         = e.CommandArgument.ToString();
         label22.Text                = Gridview1.Rows[row.RowIndex].Cells[1].Text.ToString() + "   " + Gridview1.Rows[row.RowIndex].Cells[2].Text.ToString() + "   " + Gridview1.Rows[row.RowIndex].Cells[3].Text.ToString();
         PMCopperFoundryinfo.PMCF_ID = new Guid(label_CopperID.Text);
         BindGridview3(PMCopperFoundryinfo);
         Panel1.Visible = true;
         UpdatePanel1.Update();
     }
     if (e.CommandName == "ADD")//加工
     {
         GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
         Gridview1.SelectedIndex     = row.RowIndex;
         label27.Text                = Gridview1.Rows[row.RowIndex].Cells[1].Text.ToString() + "   " + Gridview1.Rows[row.RowIndex].Cells[2].Text.ToString() + "   " + Gridview1.Rows[row.RowIndex].Cells[3].Text.ToString();
         label_CopperID.Text         = e.CommandArgument.ToString();
         PMCopperFoundryinfo.PMCF_ID = new Guid(label_CopperID.Text);
         BindGridview4(PMCopperFoundryinfo);
         Panel2.Visible = true;
         UpdatePanel2.Update();
     }
 }
Beispiel #5
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();
    }
Beispiel #6
0
 //新增
 protected void Button3_New(object sender, EventArgs e)
 {
     Panel_CopperNew.Visible = true;
     label_New.Text          = "新增铜材代工表";
     UpdatePanel_CopperNew.Update();
 }