Ejemplo n.º 1
0
 protected void GridView_CS_RowUpdating(object sender, GridViewUpdateEventArgs e)
 {
     try
     {
         csl.U_CapacityInfo(new Guid(GridView_CS.DataKeys[e.RowIndex].Values["CI_ID"].ToString().Trim()), Session["UserName"].ToString().Trim(), ((TextBox)(GridView_CS.Rows[e.RowIndex].Cells[3].Controls[0])).Text.Trim());
     }
     catch (Exception)
     {
         ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('编辑失败!')", true);
         return;
     }
     GridView_CS.SelectedIndex = -1;
     GridView_CS.EditIndex     = -1;
     //各种pannel隐藏
     TextBox_Note_Add.Text = "";
     databind1();
     Panel_Add.Visible = false;
     UpdatePanel_Add.Update();
     Panel_PBC.Visible          = false;
     GridView_PBC.SelectedIndex = -1;
     UpdatePanel_PBC.Update();
     Panel_PBCraftDetail.Visible = false;
     UpdatePanel_PBCraftDetail.Update();
     Panel_ResultCheck.Visible = false;
     UpdatePanel_ResultCheck.Update();
 }
Ejemplo n.º 2
0
 protected void Button_ClosePBC_Click(object sender, EventArgs e)
 {
     Panel_PBC.Visible = false;
     UpdatePanel_PBC.Update();
     Panel_PBCraftDetail.Visible = false;
     UpdatePanel_PBCraftDetail.Update();
     GridView_PBC.SelectedIndex = -1;
 }
Ejemplo n.º 3
0
 protected void Button_AddCS_Click(object sender, EventArgs e)
 {
     Panel_Add.Visible = true;
     UpdatePanel_Add.Update();
     GridView_CS.EditIndex     = -1;
     GridView_CS.SelectedIndex = -1;
     databind1();
     Panel_PBC.Visible = false;
     UpdatePanel_PBC.Update();
     Panel_PBCraftDetail.Visible = false;
     UpdatePanel_PBCraftDetail.Update();
     Panel_ResultCheck.Visible = false;
     UpdatePanel_ResultCheck.Update();
 }
Ejemplo n.º 4
0
    protected void GridView_PBC_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView theGrid      = sender as GridView; // refer to the GridView
        int      newPageIndex = 0;

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

            GridViewRow pagerRow = GridView_PBC.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_PBC.PageCount ? GridView_PBC.PageCount - 1 : newPageIndex;
        GridView_PBC.PageIndex = newPageIndex;
        GridView_PBC.PageIndex = newPageIndex;

        databind2();
        //  GridView_CS.SelectedIndex = -1;
        // GridView_CS.EditIndex = -1;
        //各种pannel隐藏
        TextBox_Note_Add.Text = "";
        databind1();
        Panel_Add.Visible = false;
        UpdatePanel_Add.Update();
        Panel_PBC.Visible          = true;
        GridView_PBC.SelectedIndex = -1;
        UpdatePanel_PBC.Update();
        Panel_PBCraftDetail.Visible = false;
        UpdatePanel_PBCraftDetail.Update();
        Panel_ResultCheck.Visible = false;
        UpdatePanel_ResultCheck.Update();
    }
Ejemplo n.º 5
0
 protected void Btn_Search_Click(object sender, EventArgs e)
 {
     GridView_CS.EditIndex     = -1;
     GridView_CS.SelectedIndex = -1;
     TextBox_Note_Add.Text     = "";
     //各种pannel隐藏
     databind1();
     Panel_Add.Visible = false;
     UpdatePanel_Add.Update();
     Panel_PBC.Visible          = false;
     GridView_PBC.SelectedIndex = -1;
     UpdatePanel_PBC.Update();
     Panel_ResultCheck.Visible = false;
     UpdatePanel_ResultCheck.Update();
     Panel_PBCraftDetail.Visible = false;
     UpdatePanel_PBCraftDetail.Update();
 }
Ejemplo n.º 6
0
 protected void GridView_CS_RowEditing(object sender, GridViewEditEventArgs e)
 {
     GridView_CS.EditIndex     = e.NewEditIndex;
     GridView_CS.SelectedIndex = e.NewEditIndex;
     databind1();
     //各种pannel隐藏
     TextBox_Note_Add.Text = "";
     databind1();
     Panel_Add.Visible = false;
     UpdatePanel_Add.Update();
     Panel_PBC.Visible          = false;
     GridView_PBC.SelectedIndex = -1;
     UpdatePanel_PBC.Update();
     Panel_PBCraftDetail.Visible = false;
     UpdatePanel_PBCraftDetail.Update();
     Panel_ResultCheck.Visible = false;
     UpdatePanel_ResultCheck.Update();
 }
Ejemplo n.º 7
0
 protected void Button_Cancel_Click(object sender, EventArgs e)
 {
     TextBox_makepeople.Text = "";
     TextBox_WO_Time1.Text   = "";
     TextBox_WO_Time2.Text   = "";
     TextBox_Note_Add.Text   = "";
     //各种pannel隐藏
     GridView_CS.EditIndex     = -1;
     GridView_CS.SelectedIndex = -1;
     databind1();
     Panel_Add.Visible = false;
     UpdatePanel_Add.Update();
     Panel_PBC.Visible          = false;
     GridView_PBC.SelectedIndex = -1;
     UpdatePanel_PBC.Update();
     Panel_PBCraftDetail.Visible = false;
     UpdatePanel_PBCraftDetail.Update();
     Panel_ResultCheck.Visible = false;
     UpdatePanel_ResultCheck.Update();
 }
Ejemplo n.º 8
0
 protected void Button_PBCraftDetail_Click(object sender, EventArgs e)
 {
     Panel_PBCraftDetail.Visible = false;
     UpdatePanel_PBCraftDetail.Update();
 }
Ejemplo n.º 9
0
    protected void GridView_CS_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Delete123")//
        {
            //GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            // GridView_WOmain.SelectedIndex = row.RowIndex;

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

                return;
            }

            //各种pannel隐藏
            TextBox_Note_Add.Text = "";
            databind1();
            Panel_Add.Visible = false;
            UpdatePanel_Add.Update();
            Panel_PBC.Visible          = false;
            GridView_PBC.SelectedIndex = -1;
            UpdatePanel_PBC.Update();
            Panel_PBCraftDetail.Visible = false;
            UpdatePanel_PBCraftDetail.Update();
            Panel_ResultCheck.Visible = false;
            UpdatePanel_ResultCheck.Update();
        }

        if (e.CommandName == "Capacitymake")//
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView_CS.SelectedIndex = row.RowIndex;
            string[] al = e.CommandArgument.ToString().Split(new char[] { ',' });
            Label_CI_ID.Text = al[0].Trim();
            Label_Date.Text  = al[1];
            databind2();

            //各种pannel隐藏
            TextBox_Note_Add.Text = "";
            databind1();
            Panel_Add.Visible = false;
            UpdatePanel_Add.Update();
            Panel_PBC.Visible          = true;
            GridView_PBC.SelectedIndex = -1;
            UpdatePanel_PBC.Update();
            Panel_PBCraftDetail.Visible = false;
            UpdatePanel_PBCraftDetail.Update();
            Panel_ResultCheck.Visible = false;
            UpdatePanel_ResultCheck.Update();
            GridView_CS.EditIndex = -1;
            databind1();
        }
        if (e.CommandName == "Capacitycheck")//
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView_CS.SelectedIndex = row.RowIndex;
            string[] al = e.CommandArgument.ToString().Split(new char[] { ',' });
            Label_CIID2.Text = al[0].Trim();

            //各种pannel隐藏
            TextBox_Note_Add.Text = "";
            databind1();
            Panel_Add.Visible = false;
            UpdatePanel_Add.Update();
            Panel_PBC.Visible          = false;
            GridView_PBC.SelectedIndex = -1;
            UpdatePanel_PBC.Update();
            Panel_PBCraftDetail.Visible = false;
            UpdatePanel_PBCraftDetail.Update();
            Panel_ResultCheck.Visible       = true;
            GridView_ResultCheck.DataSource = csl.S_CapacityDetailInfo_ResultCheck(al[0].Trim());
            GridView_ResultCheck.DataBind();
            UpdatePanel_ResultCheck.Update();
            GridView_CS.EditIndex = -1;
            databind1();
        }
    }
Ejemplo n.º 10
0
 public void databind3()
 {
     GridView_PBCraftDetail.DataSource = csl.S_CapacityDetailInfo("", Label_PBC_ID.Text.Trim(), Label_CI_ID.Text.Trim());
     GridView_PBCraftDetail.DataBind();
     UpdatePanel_PBCraftDetail.Update();
 }