예제 #1
0
 protected void GridView_Order_RowCommand(object sender, GridViewCommandEventArgs e) //订单号表链接按钮事件
 {
     if (e.CommandName == "Select_Order")                                            //选择订单号
     {
         GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
         GridView_Order.SelectedIndex = row.RowIndex;
         string[] al = e.CommandArgument.ToString().Split(new char[] { ',' });
         if (Panel_AddWorkOrder.Visible == true)
         {
             Label_AddOrderNum.Text = al[0];
             TextBox_Add_Order.Text = al[1];//客户订单号
             Label_OT.Text          = al[3];
             TextBox_Add_SN.Text    = GridView_Order.DataKeys[row.RowIndex].Values["OEMOT_SNum"].ToString();
             UpdatePanel_AddWorkOrder.Update();
         }
         if (Panel_EditWorkOrder.Visible == true)
         {
             Label_EditOrderNum.Text   = al[0];
             TextBox_EditOrderNum.Text = al[1];//客户订单号
             TextBox_EditSN.Text       = GridView_Order.DataKeys[row.RowIndex].Values["OEMOT_SNum"].ToString();
             UpdatePanel_EditWorkOrder.Update();
         }
         Panel_SelectOrder.Visible = false;
         UpdatePanel_SelectOrder.Update();
     }
 }
예제 #2
0
    private void editWorkOrder()
    {
        if (Label_EditOrderNum.Text.Trim() == "")
        {
            Label_EditOrderNum.Text = "00000000-0000-0000-0000-000000000000";
        }
        woinfo.SMSO_ID = new Guid(this.Label_EditOrderNum.Text.Trim());
        Guid PT_ID = new Guid(this.Label_EditPTID.Text.Trim());

        woinfo.WO_Note     = TextBox_EditNote.Text.Trim();
        woinfo.WO_People   = Session["UserName"].ToString();
        woinfo.WO_ProType  = TextBox_EditProType.Text.Trim();
        woinfo.WO_Num      = this.TextBox_EditNum.Text.Trim();
        woinfo.WO_OrderNum = TextBox_EditOrderNum.Text.Trim();
        woinfo.WO_SN       = TextBox_EditSN.Text.Trim();
        woinfo.WO_ID       = new Guid(this.Label_EditWOID.Text.Trim());
        woinfo.WO_Time     = DateTime.Now;
        ppd.WorkOrder_Edit(woinfo, PT_ID);
        ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "alert", "alert('随工单修改成功!')", true);
        string condition = " and 1=1";

        this.GridView_WOmain.PageIndex  = 0;
        this.GridView_WOmain.DataSource = wol.S_WorkOrder(condition);
        this.GridView_WOmain.DataBind();

        this.UpdatePanel_WOmain.Update();
        Panel_EditWorkOrder.Visible = false;
        UpdatePanel_EditWorkOrder.Update();
    }
예제 #3
0
    protected void GridView_ProType_RowCommand(object sender, GridViewCommandEventArgs e) //产品型号表linkbutton
    {
        if (e.CommandName == "SelectPT")                                                  //选择产品型号
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView_ProType.SelectedIndex = row.RowIndex;

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

            if (Panel_AddWorkOrder.Visible == true)
            {
                Label_PTID.Text          = al[0];
                Label_PTCodeMeaning.Text = al[2];
                Label_ChipType.Text      = al[3];
                Label_PS.Text            = al[4];
                this.TextBox_AddPT.Text  = ptname;
                UpdatePanel_AddWorkOrder.Update();
            }
            if (Panel_EditWorkOrder.Visible == true)
            {
                Label_EditPTID.Text           = al[0];
                Label_EditPS.Text             = al[4];
                this.TextBox_EditProType.Text = ptname;
                UpdatePanel_EditWorkOrder.Update();
            }
            Panel_Product.Visible        = false;
            Panel_Product_Search.Visible = false;
            Panel_WOmain.Visible         = true;
            UpdatePanel_WOmain.Update();
            string condition = " and 1=1";
            this.GridView_WOmain.DataSource = wol.S_WorkOrder(condition);
            this.GridView_WOmain.DataBind();
            UpdatePanel_Product.Update();
        }
    }
예제 #4
0
 protected void Button_EditCancel_Click(object sender, EventArgs e)
 {
     Panel_EditWorkOrder.Visible = false;
     UpdatePanel_EditWorkOrder.Update();
 }