Esempio n. 1
0
    protected void GridView_WOmain_PageIndexChanging(object sender, GridViewPageEventArgs e) //随工单表翻页
    {
        GridView theGrid      = sender as GridView;                                          // refer to the GridView
        int      newPageIndex = 0;

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

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

        databind();
        //以下pannel隐藏

        Panel_ErrorList.Visible = false;
        UpdatePanel_ErrorList.Update();
        Panel_M.Visible = false;
        UpdatePanel_M.Update();
        Panel_Error.Visible = false;
        UpdatePanel_Error.Update();
        Panel_Track.Visible = false;
        UpdatePanel_Track.Update();
        Panel_C.Visible = false;
        UpdatePanel_C.Update();
        Panel_Recover.Visible = false;
        UpdatePanel_Recover.Update();
        Panel_Review.Visible = false;
        UpdatePanel_Review.Update();
        Panel_ReWork.Visible = false;
        UpdatePanel_ReWork.Update();
    }
Esempio n. 2
0
    protected void Btn_ErrorRecover_Confirm_Click(object sender, EventArgs e)//异常结案
    {
        try
        {
            Guid   woeid  = new Guid(label_Recover_WOEID.Text.Trim());
            string people = Session["UserName"].ToString().Trim();
            string state  = "异常中";
            if (DropDownList_Recovery.SelectedItem.Text.Trim() == "是")
            {
                state = "异常恢复";
            }
            if (DropDownList_Recovery.SelectedItem.Text.Trim() == "否")
            {
                state = "异常中";
            }
            if (DropDownList_Recovery.SelectedIndex == 0)
            {
                ScriptManager.RegisterStartupScript(Page, typeof(Page), "confirm", "alert('请选择异常是否恢复!')", true);
                return;
            }
            erl.U_WOError_Done(woeid, people, TextBox_WOE_QCResult.Text.Trim(), TextBox_WOE_DoneResult.Text.Trim(), state);
            ScriptManager.RegisterStartupScript(Page, typeof(Page), "confirm", "alert('制定成功!')", true);
            Panel_Recover.Visible = false;
            string id;

            if (label_wodid.Text.Trim() == "")
            {
                id = "00000000-0000-0000-0000-000000000000";
            }
            else
            {
                id = label_wodid.Text;
            }
            GridView_Error.DataSource = erl.S_WorkOrderDetail_ErrorCheck(new Guid(id));
            GridView_Error.DataBind();
            UpdatePanel_ErrorList.Update();
            DropDownList_Recovery.SelectedIndex = 0;
        }
        catch (Exception)
        {
            ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('制定失败!')", true);
            return;
        }
    }
Esempio n. 3
0
    protected void GridView_WOmain_RowCommand(object sender, GridViewCommandEventArgs e) //随工单表行按钮
    {
        if (e.CommandName == "ErrorInfo")                                                //
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView_WOmain.SelectedIndex = row.RowIndex;
            //  GridView_WOmain.SelectedIndex = -1;
            string[] al = e.CommandArgument.ToString().Split(new char[] { ',' });
            label_wodid.Text        = al[1];
            Panel_ErrorList.Visible = true;
            string id;
            if (al[1].Trim() == "")
            {
                id = "00000000-0000-0000-0000-000000000000";
            }
            else
            {
                id = al[1];
            }
            GridView_Error.DataSource = erl.S_WorkOrderDetail_ErrorCheck(new Guid(id));
            GridView_Error.DataBind();
            UpdatePanel_ErrorList.Update();



            //以下pannel隐藏

            //  Panel_ErrorList.Visible = false;
            //  UpdatePanel_ErrorList.Update();
            Panel_M.Visible = false;
            UpdatePanel_M.Update();
            Panel_Error.Visible = false;
            UpdatePanel_Error.Update();
            Panel_Track.Visible = false;
            UpdatePanel_Track.Update();
            Panel_C.Visible = false;
            UpdatePanel_C.Update();
            Panel_Recover.Visible = false;
            UpdatePanel_Recover.Update();
            Panel_Review.Visible = false;
            UpdatePanel_Review.Update();
        }
    }
Esempio n. 4
0
    protected void Button_Cancel_Click(object sender, EventArgs e)//重置
    {
        DropDownList_level.SelectedIndex   = 0;
        DropDownList_WO_Type.SelectedIndex = 0;
        DropDownList_WoState.SelectedIndex = 0;
        TextBox_chipnum.Text  = "";
        TextBox_OrderNum.Text = "";
        TextBox_wonum.Text    = "";
        TextBox_PBC.Text      = "";
        TextBox_pt.Text       = "";
        TextBox_WO_Time1.Text = "";
        TextBox_WO_Time2.Text = "";
        TextBox_WOSN.Text     = "";
        string condition = " and 1=1";

        GridView_WOmain.DataSource = erl.S_WorkOrder_Check(condition);
        GridView_WOmain.DataBind();
        UpdatePanel_WOmain.Update();

        GridView_WOmain.SelectedIndex = -1;
        GridView_Error.SelectedIndex  = -1;
        //以下pannel隐藏

        Panel_ErrorList.Visible = false;
        UpdatePanel_ErrorList.Update();
        Panel_M.Visible = false;
        UpdatePanel_M.Update();
        Panel_Error.Visible = false;
        UpdatePanel_Error.Update();
        Panel_Track.Visible = false;
        UpdatePanel_Track.Update();
        Panel_C.Visible = false;
        UpdatePanel_C.Update();
        Panel_Recover.Visible = false;
        UpdatePanel_Recover.Update();
        Panel_Review.Visible = false;
        UpdatePanel_Review.Update();
        Panel_ReWork.Visible = false;
        UpdatePanel_ReWork.Update();
    }