Exemplo n.º 1
0
 protected void Button_ResetPT_Click(object sender, EventArgs e)
 {
     TextBox_PT.Text = "";
     databind2();
     Panel_Product.Visible = false;
     UpdatePanel_Product.Update();
 }
Exemplo n.º 2
0
 //关闭
 protected void Btn_Close_PT_Click(object sender, EventArgs e)
 {
     TextBox_Series.Text          = "";
     TextBox_ProductName.Text     = "";
     Panel_Product_Search.Visible = false;
     UpdatePanel_Product.Update();
 }
Exemplo n.º 3
0
 protected void Button_CancelAdd_Click(object sender, EventArgs e)
 {
     Panel_AddWorkOrder.Visible = false;
     UpdatePanel_AddWorkOrder.Update();
     Panel_Product_Search.Visible = false;
     UpdatePanel_Product.Update();
 }
Exemplo n.º 4
0
 protected void Button_CancelPT_Click(object sender, EventArgs e)
 {
     Txt_PT_Search.Text  = "";
     Txt_PT_Search0.Text = "";
     databind();
     Panel_Product.Visible = false;
     UpdatePanel_Product.Update();
 }
Exemplo n.º 5
0
 protected void Btn_Search_Click(object sender, EventArgs e)
 {
     datebind1();
     Panel_Product.Visible = false;
     UpdatePanel_Product.Update();
     Panel_PT.Visible = false;
     UpdatePanel_PT.Update();
 }
Exemplo n.º 6
0
    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView theGrid      = sender as GridView; // refer to the GridView
        int      newPageIndex = 0;

        if (-2 == e.NewPageIndex)
        { // when click the "GO" Button
            TextBox     txtNewPageIndex = null;
            GridViewRow pagerRow        = GridView1.BottomPagerRow;


            if (null != pagerRow)
            {
                txtNewPageIndex = (TextBox)pagerRow.FindControl("textbox");   // refer to the TextBox with the NewPageIndex value
            }

            if (null != txtNewPageIndex && txtNewPageIndex.Text != "")
            {
                newPageIndex = int.Parse(txtNewPageIndex.Text) - 1; // get the NewPageIndex
            }
        }
        else
        {  // when click the first, last, previous and next Button
            newPageIndex = e.NewPageIndex;
        }

        // check to prevent form the NewPageIndex out of the range


        if (Label_Grid1_State.Text == "默认数据源")
        {
            GridView1.DataSource = ppl.SList_ProSeries();
            GridView1.DataBind();
        }
        if (Label_Grid1_State.Text == "模糊搜索数据源")
        {
            GridView1.DataSource = ppl.S_ProSeries(Txt_search.Text.Trim());
            GridView1.DataBind();
        } //绑定数据源

        //bindgridview1();
        newPageIndex = newPageIndex < 0 ? 0 : newPageIndex;
        newPageIndex = newPageIndex >= GridView1.PageCount ? GridView1.PageCount - 1 : newPageIndex;

        // specify the NewPageIndex
        GridView1.PageIndex = newPageIndex;

        GridView1.PageIndex = newPageIndex;
        GridView1.DataBind();

        Panel_PT.Visible = false;
        UpdatePanel_PT.Update();
        Panel_Product.Visible = false;
        UpdatePanel_Product.Update();
        GridView1.SelectedIndex = -1;
        GridView1.EditIndex     = -1;
    }
Exemplo n.º 7
0
    //检索栏检索按钮
    protected void SelectProType(object sender, EventArgs e)
    {
        string PS = TextBox_Series.Text;
        string PT = TextBox_ProductName.Text;

        GridView_ProType.DataSource = iQCBasicDataL.Search_ProType_RZ(PS, PT);
        GridView_ProType.DataBind();
        UpdatePanel_Product.Update();
    }
Exemplo n.º 8
0
    protected void GridView_WOmain_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Delete12")//
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;

            string id = e.CommandArgument.ToString().Trim();
            try
            {
                Guid guid = new Guid(id);
                ppl.D_ProMainSeries(guid);
                ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('删除成功!')", true);
            }
            catch (Exception)
            {
                ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('删除失败!,请您再核对!')", true);

                return;
            }

            databind1();
            Panel_add.Visible       = false;
            TextBox_wtname_Add.Text = "";
            UpdatePanel_add.Update();
            Panel_pt.Visible = false;
            UpdatePanel_pt.Update();
            Panel_Product.Visible = false;
            UpdatePanel_Product.Update();
            CheckBoxAll.Checked     = false;
            CheckBoxfanxuan.Checked = false;
            CheckBox2.Checked       = false;
            Checkfanxuan2.Checked   = false;
        }

        if (e.CommandName == "membermgt")//
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView_WOmain.SelectedIndex = row.RowIndex;

            string[] al = e.CommandArgument.ToString().Split(new char[] { ',' });
            label_S.Text   = al[1];
            label_SID.Text = al[0];

            databind2();
            Panel_add.Visible       = false;
            TextBox_wtname_Add.Text = "";
            UpdatePanel_add.Update();
            Panel_pt.Visible = true;
            UpdatePanel_pt.Update();
            Panel_Product.Visible = false;
            UpdatePanel_Product.Update();
            CheckBoxAll.Checked     = false;
            CheckBoxfanxuan.Checked = false;
            CheckBox2.Checked       = false;
            Checkfanxuan2.Checked   = false;
        }
    }
Exemplo n.º 9
0
 protected void Btn_CloseS_Click(object sender, EventArgs e)
 {
     GridView1.SelectedIndex = -1;
     Panel_PT.Visible        = false;
     UpdatePanel_PT.Update();
     Panel_Product.Visible = false;
     UpdatePanel_Product.Update();
     UpdatePanel_PS.Update();
 }
Exemplo n.º 10
0
 protected void Btn_Close_PT_Click(object sender, EventArgs e)
 {
     CheckBox2.Checked        = false;
     Checkfanxuan2.Checked    = false;
     TextBox_Series.Text      = "";
     TextBox_ProductName.Text = "";
     Panel_Product.Visible    = false;
     UpdatePanel_Product.Update();
 }
Exemplo n.º 11
0
    protected void Button_AddPTToSeries_Click(object sender, EventArgs e)
    {
        int sum = 0;

        try
        {
            for (int i = 0; i <= GridView_ProType.Rows.Count - 1; i++)
            {
                CheckBox CheckBox = (CheckBox)GridView_ProType.Rows[i].FindControl("CheckBox2");
                if (CheckBox.Checked == true)
                {
                    //ppp.I_PMPCountersignBasic(GridView_ProType.DataKeys[i].Values["BDOS_Code"].ToString().Trim(),'1');
                    //sum++;
                    label_pagestate.Text = Request.QueryString["state"];
                    string state = label_pagestate.Text;
                    if (state == "scyjhhqbmgl")
                    {
                        ppp.I_PMPCountersignBasic(GridView_ProType.DataKeys[i].Values["BDOS_Code"].ToString().Trim(), 1);
                    }
                    if (state == "sczjhhqbmgl")
                    {
                        ppp.I_PMPCountersignBasic(GridView_ProType.DataKeys[i].Values["BDOS_Code"].ToString().Trim(), 3);
                    }
                    if (state == "mkyjhhqbmgl")
                    {
                        ppp.I_PMPCountersignBasic(GridView_ProType.DataKeys[i].Values["BDOS_Code"].ToString().Trim(), 2);
                    }
                    if (state == "mkzjhhqbmgl")
                    {
                        ppp.I_PMPCountersignBasic(GridView_ProType.DataKeys[i].Values["BDOS_Code"].ToString().Trim(), 4);
                    }
                    sum++;
                }
            }
            if (sum == 0)
            {
                ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('您没选择任何要添加的部门!请您再核对!')", true);
                return;
            }
            ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('添加成功!')", true);
        }
        catch (Exception)
        {
            ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('添加失败!,请您再核对!')", true);
        }
        //GridView_LPT.DataSource = ppp.S_PMPCountersignBasic();
        //GridView_LPT.DataBind();
        //UpdatePanel_pt.Update();
        GetCondition1();
        Panel_Product.Visible = false;
        UpdatePanel_Product.Update();
        CheckBoxAll.Checked     = false;
        CheckBoxfanxuan.Checked = false;
        CheckBox2.Checked       = false;
        Checkfanxuan2.Checked   = false;
    }
Exemplo n.º 12
0
    //选择产品型号
    protected void Btn_SelectPT_Click(object sender, EventArgs e)
    {
        Panel_Product_Search.Visible = true;

        TextBox_Series.Text         = "";
        TextBox_ProductName.Text    = "";
        GridView_ProType.DataSource = iQCBasicDataL.Search_ProType_RZ("", "");
        GridView_ProType.DataBind();
        UpdatePanel_Product.Update();
    }
Exemplo n.º 13
0
 //检索栏重置
 protected void Reset1(object sender, EventArgs e)
 {
     TextBox_Series.Text      = "";
     TextBox_ProductName.Text = "";
     PSl.Text = "";
     PTl.Text = "";
     GridView_ProType.DataSource = iQCBasicDataL.Search_ProType_RZ(PSl.Text, PTl.Text);
     GridView_ProType.DataBind();
     UpdatePanel_Product.Update();
 }
Exemplo n.º 14
0
 protected void Button_ChosePT_Click(object sender, EventArgs e)
 {
     Panel_Product.Visible = true;
     //GridView_ProType.DataSource = ppp.S_PMPCountersignBasic_BD("and PMPCB_Type = '1'");
     //GridView_ProType.DataBind();
     GetCondition2();
     CheckBoxAll.Checked     = false;
     CheckBoxfanxuan.Checked = false;
     UpdatePanel_Product.Update();
 }
Exemplo n.º 15
0
    public void datebind3()
    {
        string condition;
        string HRDD_StaffNO = TextBox_Series.Text.Trim() == "" ? " and 1=1 " : " and HRDD_StaffNO like '%" + TextBox_Series.Text.Trim() + "%' ";
        string HRDD_Name    = TextBox_ProductName.Text.Trim() == "" ? " and 1=1 " : " and HRDD_Name like '%" + TextBox_ProductName.Text.Trim() + "%' ";

        condition = HRDD_StaffNO + HRDD_Name;
        GridView_ProType.DataSource = cs.S_CSUser_HRDD_Detail(condition);
        GridView_ProType.DataBind();
        UpdatePanel_Product.Update();
    }
Exemplo n.º 16
0
    public void databind3()
    {
        string condition;
        string ptsname = TextBox_Series.Text.Trim() == "" ? " and 1=1 " : " and PS_Name like '%" + TextBox_Series.Text.Trim() + "%' ";
        string ptname  = TextBox_ProductName.Text.Trim() == "" ? " and 1=1 " : " and PT_Name like '%" + TextBox_ProductName.Text.Trim() + "%' ";

        condition = ptsname + ptname;
        GridView_ProType.DataSource = ppl.S_Protype_ProMainSeries(condition);
        GridView_ProType.DataBind();
        UpdatePanel_Product.Update();
    }
Exemplo n.º 17
0
 protected void Btn_CloseS_Click(object sender, EventArgs e)
 {
     CheckBoxAll.Checked     = false;
     CheckBoxfanxuan.Checked = false;
     Panel_add.Visible       = false;
     UpdatePanel_add.Update();
     Panel_pt.Visible = false;
     UpdatePanel_pt.Update();
     Panel_Product.Visible = false;
     UpdatePanel_Product.Update();
 }
Exemplo n.º 18
0
    public void databind3()
    {
        string condition;
        string PT_Name = TextBox_ProductName.Text.Trim() == "" ? " and 1=1 " : " and PT_Name like '%" + TextBox_ProductName.Text.Trim() + "%' ";
        string PS_Name = TextBox_Series.Text.Trim() == "" ? " and 1=1 " : " and PS_Name like '%" + TextBox_Series.Text.Trim() + "%' ";

        condition = PT_Name;
        GridView_ProType.DataSource = csl.S_ProTypeForCSName(condition);
        GridView_ProType.DataBind();
        UpdatePanel_Product.Update();
    }
Exemplo n.º 19
0
 protected void Button_Add_Click(object sender, EventArgs e)
 {
     Panel_AddPS.Visible = true;
     UpdatePanel_AddPS.Update();
     Panel_Product.Visible = false;
     Panel_PT.Visible      = false;
     UpdatePanel_PT.Update();
     UpdatePanel_Product.Update();
     GridView1.SelectedIndex = -1;
     UpdatePanel_PS.Update();
 }
Exemplo n.º 20
0
 protected void Button_CloseProduct_Click(object sender, EventArgs e)
 {
     //  TextBox_PT.Text = "";
     TextBox_Series.Text      = "";
     TextBox_ProductName.Text = "";
     Panel_Add.Visible        = false;
     UpdatePanel_Add.Update();
     //   Panel_PT.Visible = false;
     //  UpdatePanel_PT.Update();
     Panel_Product.Visible = false;
     UpdatePanel_Product.Update();
 }
Exemplo n.º 21
0
    public void databind2()
    {
        string condition;

        string PT_Name = TextBox_Series.Text.Trim() == "" ? " and 1=1 " : " and PT_Name like '%" + TextBox_Series.Text.Trim() + "%' ";
        string PT_Code = TextBox_ProductName.Text.Trim() == "" ? " and 1=1 " : " and PT_Code like '%" + TextBox_ProductName.Text.Trim() + "%' ";

        condition = PT_Name + PT_Code;
        GridView_ProType.DataSource = ppl.S_Protype_ProSeries_ForChose(condition);
        GridView_ProType.DataBind();
        UpdatePanel_Product.Update();
    }
Exemplo n.º 22
0
    public void databind_PT()
    {
        string condition;
        string PS_Name         = TextBox_Series.Text.Trim() == "" ? " and 1=1 " : " and PS_Name like '%" + TextBox_Series.Text.Trim() + "%' ";
        string PT_Name         = TextBox_ProductName.Text.Trim() == "" ? " and 1=1 " : " and PT_Name like '%" + TextBox_ProductName.Text.Trim() + "%' ";
        string PT_Code         = TextBox_ProductName0.Text.Trim() == "" ? " and 1=1 " : " and PT_Code like '%" + TextBox_ProductName0.Text.Trim() + "%' ";
        string PT_CodeMeanning = TextBox_ProductName1.Text.Trim() == "" ? " and 1=1 " : " and PT_CodeMeanning like '%" + TextBox_ProductName1.Text.Trim() + "%' ";

        condition = PS_Name + PT_Name + PT_CodeMeanning + PT_Code;
        GridView_ProType.DataSource = ppd.S_ProType_For_WorkOrder(condition);
        GridView_ProType.DataBind();
        UpdatePanel_Product.Update();
    }
Exemplo n.º 23
0
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Delete1")//
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            string      id  = e.CommandArgument.ToString().Trim();
            try
            {
                Guid guid = new Guid(id);
                cs.D_CSUser(guid);
                ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('删除成功!')", true);
            }
            catch (Exception)
            {
                ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('删除失败!,请您再核对!')", true);

                return;
            }

            datebind1();
            Panel_Product.Visible = false;
            UpdatePanel_Product.Update();
            Panel_PT.Visible = false;
            UpdatePanel_PT.Update();
            CheckBox2.Checked     = false;
            Checkfanxuan2.Checked = false;
        }

        if (e.CommandName == "CheckProType")//
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView1.SelectedIndex = row.RowIndex;

            string[] al = e.CommandArgument.ToString().Split(new char[] { ',' });
            Label_HRDD_ID.Text           = al[0];
            Label_PS.Text                = al[1];
            Panel_PT.Visible             = true;
            DropDownList1.DataSource     = cs.S_CSUser_PBCName(new Guid(al[0].Trim()));
            DropDownList1.DataTextField  = "PBC_Name";
            DropDownList1.DataValueField = "PBC_ID";
            DropDownList1.DataBind();
            datebind2();


            Panel_Product.Visible = false;
            UpdatePanel_Product.Update();

            CheckBox2.Checked     = false;
            Checkfanxuan2.Checked = false;
        }
    }
Exemplo n.º 24
0
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Delete1")
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView1.SelectedIndex = row.RowIndex;
            GridView1.SelectedIndex = -1;

            try
            {
                string id      = e.CommandArgument.ToString();
                Guid   guid_id = new Guid(id);
                ppl.D_WorkOrderCode(guid_id);
            }
            catch (Exception)
            {
                ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('删除失败!请先删除该代码下所属的产品型号!')", true);
            }

            GridView1.DataSource = ppl.SList_WorkOrderCode();
            GridView1.DataBind();
            UpdatePanel_PS.Update();
            //无关信息隐藏

            Panel_AddPS.Visible = false;

            UpdatePanel_AddPS.Update();
        }
        if (e.CommandName == "CheckProType")
        {
            Panel_PT.Visible        = true;
            GridView2.SelectedIndex = -1;

            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView1.SelectedIndex = row.RowIndex;

            string[] al = e.CommandArgument.ToString().Split(new char[] { ',' });
            string   id = al[0];
            Label_PsName.Text = al[1] + " 所属";
            Label_PS.Text     = id;
            Guid guid_id = new Guid(id);


            databind();
            //无关信息隐藏
            Panel_AddPS.Visible = false;
            UpdatePanel_AddPS.Update();
            Panel_Product.Visible = false;
            UpdatePanel_Product.Update();
        }
    }
Exemplo n.º 25
0
 protected void Button_Add_Click(object sender, EventArgs e)
 {
     GridView1.EditIndex     = -1;
     GridView1.SelectedIndex = -1;
     GridView1.DataSource    = ppl.SList_WorkOrderCode();
     GridView1.DataBind();
     UpdatePanel_PS.Update();
     Panel_AddPS.Visible = true;
     UpdatePanel_AddPS.Update();
     Panel_Product.Visible = false;
     Panel_PT.Visible      = false;
     UpdatePanel_PT.Update();
     UpdatePanel_Product.Update();
 }
Exemplo n.º 26
0
 protected void Button_AddTeam_Click(object sender, EventArgs e)
 {
     Panel_add.Visible       = true;
     TextBox_wtname_Add.Text = "";
     UpdatePanel_add.Update();
     Panel_pt.Visible = false;
     UpdatePanel_pt.Update();
     Panel_Product.Visible = false;
     UpdatePanel_Product.Update();
     CheckBoxAll.Checked     = false;
     CheckBoxfanxuan.Checked = false;
     CheckBox2.Checked       = false;
     Checkfanxuan2.Checked   = false;
 }
Exemplo n.º 27
0
    protected void Button_Cancel_Click(object sender, EventArgs e)
    {
        Txt_search.Text = "";
        TextBox1.Text   = "";
        TextBox2.Text   = "";
        datebind1();
        GridView1.PageIndex     = 0;
        GridView1.SelectedIndex = -1;

        Panel_Product.Visible = false;
        UpdatePanel_Product.Update();
        Panel_PT.Visible = false;
        UpdatePanel_PT.Update();
    }
Exemplo n.º 28
0
    protected void GridView_PT_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView theGrid      = sender as GridView; // refer to the GridView
        int      newPageIndex = 0;

        GridView_PT.SelectedIndex = -1;
        if (-1 == e.NewPageIndex)
        {
            TextBox txtNewPageIndex = null;

            GridViewRow pagerRow = GridView_PT.BottomPagerRow;


            if (null != pagerRow)
            {
                txtNewPageIndex = (TextBox)pagerRow.FindControl("textbox");
            }

            if (null != txtNewPageIndex && txtNewPageIndex.Text != "")
            {
                newPageIndex = int.Parse(txtNewPageIndex.Text) - 1;
            }
        }
        else
        {
            newPageIndex = e.NewPageIndex;
        }
        newPageIndex          = newPageIndex < 0 ? 0 : newPageIndex;
        newPageIndex          = newPageIndex >= GridView_PT.PageCount ? GridView_PT.PageCount - 1 : newPageIndex;
        GridView_PT.PageIndex = newPageIndex;
        GridView_PT.PageIndex = newPageIndex;

        databind2();
        GridView_PT.SelectedIndex = -1;
        GridView_PT.EditIndex     = -1;
        //各种pannel隐藏
        //  TextBox_PT.Text = "";
        TextBox_Series.Text      = "";
        TextBox_ProductName.Text = "";
        Panel_Add.Visible        = false;
        UpdatePanel_Add.Update();
        Panel_PT.Visible = true;
        UpdatePanel_PT.Update();
        Panel_Product.Visible = false;
        UpdatePanel_Product.Update();
        Panel_Basic.Visible = false;
        TextBox_PBC.Text    = "";
        UpdatePanel_Basic.Update();
    }
Exemplo n.º 29
0
 protected void Btn_Search_Click(object sender, EventArgs e)
 {
     databind1();
     Panel_add.Visible       = false;
     TextBox_wtname_Add.Text = "";
     UpdatePanel_add.Update();
     Panel_pt.Visible = false;
     UpdatePanel_pt.Update();
     Panel_Product.Visible = false;
     UpdatePanel_Product.Update();
     CheckBoxAll.Checked     = false;
     CheckBoxfanxuan.Checked = false;
     CheckBox2.Checked       = false;
     Checkfanxuan2.Checked   = false;
 }
Exemplo n.º 30
0
 protected void Btn_Search_Click(object sender, EventArgs e)
 {
     GridView_CS.EditIndex = -1;
     databind1();
     Panel_Add.Visible = false;
     UpdatePanel_Add.Update();
     Panel_PT.Visible = false;
     UpdatePanel_PT.Update();
     Panel_Product.Visible = false;
     UpdatePanel_Product.Update();
     Panel_Basic.Visible = false;
     UpdatePanel_Basic.Update();
     Panel1.Visible = false;
     UpdatePanel1.Update();
 }