protected void Button1_Click(object sender, EventArgs e) //点击检索按钮 { string a1 = TextBox1.Text; string a2 = TextBox2.Text; string a3 = TextBox3.Text; string a4 = TextBox4.Text; DateTime a5; DateTime a6; a5 = Convert.ToDateTime(TextBox5.Text == "" ? "1/1/1753 12:00:00 AM" : TextBox5.Text); a6 = Convert.ToDateTime(TextBox6.Text == "" ? "12/31/9999 11:59:59 PM" : TextBox6.Text); string a7 = TextBox7.Text; string a8 = DropDownList1.SelectedValue; string a9 = TextBox8.Text; string a10 = TextBox9.Text; int a11 = CheckBox1.Checked ? 0 : 1; GridView1.DataSource = bom.Query_ControlledDocApp(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); GridView1.DataBind(); Panel3.Visible = false; Panel31.Visible = false; Panel4.Visible = false; Panel41.Visible = false; Panel5.Visible = false; Panel51.Visible = false; Panel6.Visible = false; UpdatePanel6.Update(); UpdatePanel1.Update(); UpdatePanel2.Update(); UpdatePanel3.Update(); UpdatePanel4.Update(); UpdatePanel5.Update(); }
protected void GridView5_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Choose") { GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; Guid id = new Guid(e.CommandArgument.ToString()); Label38.Text = id.ToString(); Label36.Text = row.Cells[1].Text; Label37.Text = row.Cells[2].Text; Panel51.Visible = false; Panel52.Visible = false; Panel53.Visible = false; UnitCheck.Visible = true; DropDownList3.Items.Clear(); SqlDataReader myReader = bom.Query_MUnit(id); while (myReader.Read()) { DropDownList3.Items.Add(new ListItem(myReader["UnitName"].ToString(), myReader["UnitID"].ToString()));//增加Item } Button39.Visible = true; Panel6.Visible = false; UpdatePanel6.Update(); UpdatePanel4.Update(); UpdatePanel5.Update(); } }
protected void Button31_Click(object sender, EventArgs e) { Label36.Text = "请选择物料"; Label37.Text = "请选择物料"; UnitCheck.Visible = false; Panel41.Visible = true; TextBox14.Text = ""; TextBox15.Text = ""; TextBox17.Text = ""; FuseText.Visible = false; DropDownList4.Visible = false; Label35.Text = "请选择工序"; Guid id = new Guid(Label3.Text); GridView3.DataSource = bom.Query_BOMDetail(id); GridView3.DataBind(); Label31.Text = "新增"; DropDownList3.Items.Clear(); Label32.Text = Label4.Text; Panel4.Visible = true; Panel31.Visible = false; Panel5.Visible = false; Panel51.Visible = false; Button39.Visible = false; UpdatePanel4.Update(); UpdatePanel5.Update(); UpdatePanel3.Update(); Panel6.Visible = false; UpdatePanel6.Update(); }
protected void SummitUnitModify_Click(object sender, EventArgs e) { decimal num = Convert.ToDecimal(TextBox18.Text); int a = bom.Update_UnitChange(new Guid(UnitChangeID.Text), num); if (a == 1) { ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('修改成功!')", true); GridView9.DataSource = bom.Query_MAllUnit(new Guid(Label38.Text)); GridView9.DataBind(); Panel55.Visible = false; GridView3.DataSource = bom.Query_BOMDetail(new Guid(Label3.Text)); GridView3.DataBind(); UpdatePanel4.Update(); UpdatePanel5.Update(); } else { ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('操作失败!')", true); GridView9.DataSource = bom.Query_MAllUnit(new Guid(Label38.Text)); GridView9.DataBind(); Panel55.Visible = false; UpdatePanel5.Update(); } }
protected void btnRemoveIngredient_Click(object sender, EventArgs e) { LinkButton btn = sender as LinkButton; if (btn != null) { DataListItem item = btn.Parent.Parent as DataListItem; List <SRL_Ingredient> list = Ingredients; if (item != null) { list.RemoveAt(item.ItemIndex); } Ingredients = list; } dlistIngredients.DataSource = Ingredients.ToArray(); dlistIngredients.DataBind(); txtFoodName.Text = ""; txtQuantity.Text = ""; //ddlFractions.SelectedIndex = 0; ddlMeasurementUnits.SelectedIndex = 0; btnAddIngerdient.CommandArgument = MyGlobalResources.Add; UpdatePanel2.Update(); UpdatePanel3.Update(); UpdatePanel4.Update(); }
protected void BtnNew_Click(object sender, EventArgs e) { TxtAperson.Text = ""; TxtCperson.Text = ""; Panel_NewType.Visible = false; UpdatePanel_NewType.Update(); Panel_SearchEmployee.Visible = false; Panel_Grid_Detail.Visible = false; Panel_AddEmployee.Visible = false; UpdatePanel_SearchEmployee.Update(); UpdatePanel_Grid_Detail.Update(); UpdatePanel_AddEmployee.Update(); Panel_NewType.Visible = false; UpdatePanel_NewType.Update(); Panel2.Visible = false; Panel3.Visible = false; Panel4.Visible = false; UpdatePanel2.Update(); UpdatePanel3.Update(); UpdatePanel4.Update(); Panel_NewType.Visible = true; UpdatePanel_NewType.Update(); TxtNewType.Text = ""; Label28.Text = "新增"; }
protected void Button_Cancel_Click(object sender, EventArgs e) { TextBox_chip.Text = ""; TextBox_order.Text = ""; TextBox_orderTime1.Text = ""; TextBox_orderTime2.Text = ""; TextBox_planproduction_Time1.Text = ""; TextBox_planproduction_Time2.Text = ""; TextBox_pt.Text = ""; TextBox_realproduction_Time1.Text = ""; TextBox_realproduction_Time2.Text = ""; TextBox_shijijiaohuo_Time1.Text = ""; TextBox_shijijiaohuo_Time2.Text = ""; TextBox_yujijiaohuo_Time1.Text = ""; TextBox_yujijiaohuo_Time2.Text = ""; //pannel 各种隐藏 Panel2.Visible = false; UpdatePanel2.Update(); TextBox5.Text = ""; TextBox7.Text = ""; TextBox12.Text = ""; TextBox11.Text = ""; TextBox8.Text = ""; TextBox3.Text = ""; //随工单信息pannel隐藏 Panel4.Visible = false; TextBox20.Text = ""; TextBox21.Text = ""; label_Order.Text = ""; UpdatePanel4.Update(); databind(); }
/// <summary> /// Get the PredictedObserved Details based on the Predicted Observed Id, and then call /// BindCurrentAcceptedValues, passing the requrid details /// </summary> /// <param name="variable"></param> /// <param name="predictedObservedId"></param> private void BindCurrentAcceptedChartAndValues(bool updateChart) { string variable = ddlVariables.SelectedItem.Text; int predictedObservedId = int.Parse(Convert.ToString(hfPredictedObservedID.Value)); PredictedObservedDetail currPODetails = PredictedObservedDS.GetByPredictedObservedID(predictedObservedId); POValuesList = BindCurrentAcceptedValuesssssss(variable, currPODetails); POValuesDT = Genfuncs.ToDataTable(POValuesList); Session["POValuesDT"] = POValuesDT; gvPOValues.DataSource = POValuesDT; gvPOValues.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); gvPOValues.DataBind(); UpdatePanel2.Update(); if (updateChart == true) { BindCurrentAcceptedChart(variable, POValuesList); UpdatePanel4.Update(); } }
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Auto") { GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; Panel3.Visible = true; UpdatePanel3.Update(); Maxnum.Text = row.Cells[4].Text; PID.Text = e.CommandArgument.ToString(); } if (e.CommandName == "Details") { PID.Text = e.CommandArgument.ToString(); GridView2.DataSource = pb.Query_BillMain(new Guid(PID.Text)); GridView2.DataBind(); Panel4.Visible = true; UpdatePanel4.Update(); } if (e.CommandName == "NotBill") { PID.Text = e.CommandArgument.ToString(); Panel6.Visible = true; UpdatePanel6.Update(); GridView4.DataSource = pb.Query_PurchaseOrderDetailNotBill(new Guid(PID.Text)); GridView4.DataBind(); UpdatePanel6.Update(); } }
protected void BtnSelect2_Click(object sender, EventArgs e) { Panel4.Visible = true; BindGridView_Teacher(""); UpdatePanel4.Update(); flag = "审核人"; }
protected void Button_Cancel(object sender, EventArgs e) { Panel3.Visible = false; Panel4.Visible = false; UpdatePanel3.Update(); UpdatePanel4.Update(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Panel4.Visible = false; Panel3.Visible = false; Panel5.Visible = false; Panel6.Visible = false; Panel7.Visible = false; Panel8.Visible = false; Panel9.Visible = false; Panel10.Visible = false; GridView1.DataSource = pmc.Query_Copper(); GridView1.DataBind(); UpdatePanel2.Update(); UpdatePanel3.Update(); UpdatePanel4.Update(); UpdatePanel5.Update(); UpdatePanel6.Update(); UpdatePanel7.Update(); UpdatePanel8.Update(); UpdatePanel9.Update(); UpdatePanel10.Update(); } }
//检索供应商 protected void Button1_KiMi(object sender, EventArgs e) { string condition = GetCondition_Supply(); BindGridview2(condition); UpdatePanel4.Update(); }
//重置检索供应商 protected void Button_CoMi(object sender, EventArgs e) { TextBox7.Text = ""; TextBox13.Text = ""; BindGridview2(""); UpdatePanel4.Update(); }
protected void ChooseType_Click(object sender, EventArgs e) { Panel4.Visible = true; GridView2.DataSource = dp.Query_ProType("%"); GridView2.DataBind(); UpdatePanel4.Update(); }
protected void GridView2_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "mo") { var row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; GridView1.SelectedIndex = row.RowIndex; code.Text = e.CommandArgument.ToString(); TextBox3.Text = row.Cells[1].Text; Panel4.Visible = true; Label3.Text = "修改"; if (row.Cells[4].Text == "") { DropDownList3.SelectedIndex = DropDownList3.Items.IndexOf(DropDownList3.Items.FindByText("无")); } else { DropDownList3.SelectedIndex = DropDownList3.Items.IndexOf(DropDownList3.Items.FindByText(row.Cells[4].Text)); } Label4.Text = row.Cells[1].Text; UpdatePanel4.Update(); } if (e.CommandName == "del") { var row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; string code = e.CommandArgument.ToString(); int a = Or.DeleteOr(code); GridView2.DataSource = Or.Query_Organization(code); GridView2.DataBind(); UpdatePanel3.Update(); } }
protected void gvUsers_RowCommand(object sender, GridViewCommandEventArgs e) { try { if (e.CommandName == "Modify") { txtPasswordEdit.Focus(); string UserID = e.CommandArgument.ToString(); clsUserView objUser = clsUserViewHandler.GetUserDetails("User", UserID); txtUserNameEdit.Text = objUser.UserID; if (objUser.EmpID.ToString() != "") { ddlEmployeeIDEdit.SelectedValue = objUser.EmpID.ToString(); } else { ddlEmployeeIDEdit.SelectedIndex = -1; } ddlLevelTypeEdit.SelectedValue = objUser.LevelID; txtUserNameEdit.ReadOnly = true; txtPasswordEdit.Text = ""; txtConfirmPasswordEdit.Text = ""; lblErrorEdit.Text = string.Empty; lblErrorEdit.Visible = true; mpeEditUser.Show(); } } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, clsCommonHandler.PageName()); } ScriptManager.RegisterClientScriptBlock(UpdatePanel4, UpdatePanel4.GetType(), "Script", "validateChosen();", true); }
protected void SummitDetail_Click(object sender, EventArgs e) { int count = 0; int count2 = 0; foreach (GridViewRow rows in GridView3.Rows) { if (((CheckBox) rows.Cells[0].FindControl("CheckBox")).Checked) { int a = me.InsertDetail(new Guid(HSFID.Text), new Guid(GridView3.DataKeys[rows.RowIndex].Value.ToString()),Session["UserName"].ToString()); count++; count2 += a; } } if (count2== count) { ScriptManager.RegisterStartupScript(Page, typeof (Page), "alert", "alert('操作成功!')", true); Panel4.Visible = false; UpdatePanel4.Update(); GridView2.DataSource = me.QueryDetail(new Guid(HSFID.Text)); GridView2.DataBind(); UpdatePanel3.Update(); } else { ScriptManager.RegisterStartupScript(Page, typeof (Page), "alert", "alert('失败了诶...')", true); Panel4.Visible = false; UpdatePanel4.Update(); GridView2.DataSource = me.QueryDetail(new Guid(HSFID.Text)); GridView2.DataBind(); UpdatePanel3.Update(); } }
protected void Button532_Click(object sender, EventArgs e) { if (Label533.Text == "请选择单位") { ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('还没选择单位呢,请选择单位后再提交!')", true); } else { int a = bom.Insert_IMUnitChange(new Guid(Label38.Text), new Guid(Label534.Text), decimal.Parse(TextBox24.Text)); if (a == -1) { ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('已存在该单位啦.')", true); } else { DropDownList3.Items.Clear(); SqlDataReader myReader = bom.Query_MUnit(new Guid(Label38.Text)); while (myReader.Read()) { DropDownList3.Items.Add(new ListItem(myReader["UnitName"].ToString(), myReader["UnitID"].ToString()));//增加Item } Panel53.Visible = false; UpdatePanel4.Update(); UpdatePanel5.Update(); } } }
protected void NewMainSummit_Click(object sender, EventArgs e) { if (TextBox3.Text == "" || TextBox4.Text == "") { ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('日期必须填哦!');", true); } else { int a = pwp.InsertWeekPlan(Convert.ToInt32(DropDownList4.SelectedValue), Convert.ToInt32(DropDownList5.SelectedValue), Convert.ToInt32(DropDownList7.SelectedValue), Convert.ToDateTime(TextBox3.Text), Convert.ToDateTime(TextBox4.Text), Session["UserName"].ToString(), TextBox2.Text); if (a == 1) { ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('新增付款周计划成功!')", true); Panel4.Visible = false; UpdatePanel4.Update(); } else { ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('失败了诶...')", true); Panel4.Visible = false; UpdatePanel4.Update(); } Bindgrid1(); } }
protected void BtnEnviarTarea_Click(object sender, EventArgs e) { try { DataTable vDatos = new DataTable(); String vQuery = "RSP_TiempoExtraordinarioGenerales 57," + DDLTrabajos.SelectedValue + ",'" + TxTarea.Text + "'," + Session["USUARIO"] + ",1"; Int32 vRespuesta = vConexion.ejecutarSql(vQuery); if (vRespuesta == 1) { Mensaje("Subtarea de trabajo agregado con exito", WarningType.Success); } else { Mensaje("Ha ocurrido un error. Favor comunicarse con sistemas.", WarningType.Danger); } limpiarSubTarea(); UpdatePanel4.Update(); ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "closeModalTarea();", true); } catch (Exception Ex) { Mensaje(Ex.Message, WarningType.Danger); } }
//关闭上传附件 protected void Button1_Emi(object sender, EventArgs e) { TextBox18.Text = ""; TextBox19.Text = ""; ClosePanel(); UpdatePanel4.Update(); }
}//重置 protected void GridView_SalaryItemAll_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Select") { try { LbLblRecordSIT_ItemID2.Text = e.CommandArgument.ToString(); GridViewRow drv = ((GridViewRow)(((LinkButton)(e.CommandSource)).Parent.Parent)); int i = drv.RowIndex; if (flag == "考核人") { Label29.Text = GridView_Teacher.Rows[i].Cells[0].Text.ToString(); TxtAperson.Text = GridView_Teacher.Rows[i].Cells[1].Text.ToString(); } else { Label30.Text = GridView_Teacher.Rows[i].Cells[0].Text.ToString(); TxtCperson.Text = GridView_Teacher.Rows[i].Cells[1].Text.ToString(); } Panel4.Visible = false; UpdatePanel4.Update(); UpdatePanel_NewType.Update(); } catch (Exception) { throw; } } }//表中的选择
//选择供应商 protected void Button_Select2(object sender, EventArgs e) { labelSupplySelect.Text = "检索"; BindGridview2(""); Panel4.Visible = true; UpdatePanel4.Update(); }
protected void btnAdd_Click(object sender, EventArgs e) { lblErrorSingleEntry.Text = string.Empty; lblMessages.Text = ""; txtCalendarFrom.Text = ""; mpeAddNewEntry.Show(); ScriptManager.RegisterClientScriptBlock(UpdatePanel4, UpdatePanel4.GetType(), "Script", "validateChosen();", true); }
protected void SearchType_Click(object sender, EventArgs e) { string name = TextBox21.Text; GridView2.DataSource = dp.Query_ProType(name); GridView2.DataBind(); UpdatePanel4.Update(); }
private void LoadCart() { var cartList = Cart.GetCartItems(); CartRepeater.DataSource = cartList; CartRepeater.DataBind(); UpdatePanel4.Update(); }
}//考核人和审核人列表GridView_Teacher protected void BtnSearchPeopleOut_Click(object sender, EventArgs e) { Condition3 = TextBox2.Text.Trim() == "" ? " " : " and UMUI_UserID like '%" + TextBox2.Text.Trim() + "%'"; Condition3 += TextBox3.Text.Trim() == "" ? " " : " and UMUI_UserName like '%" + TextBox3.Text.Trim() + "%'"; Condition3 += TextBox4.Text.Trim() == "" ? " " : " and BDOS_Name like '%" + TextBox4.Text.Trim() + "%'"; Label9.Text = "检索后"; BindGridView_Teacher(Condition3); UpdatePanel4.Update(); }//检索
protected void btnReloadForResample_Click(object sender, ImageClickEventArgs e) { ImageButton lb = (ImageButton)sender; int searchCase = lb.ID == "lbtnReloadForNew" ? 1 : lb.ID == "lbtnReloadForDriverMissing" ? 2 : 3; populateGrid(searchCase); Messages.ClearMessage(); UpdatePanel4.Update(); }
}//检索 protected void BtnResetPeopleOut_Click(object sender, EventArgs e) { TextBox2.Text = ""; TextBox3.Text = ""; TextBox4.Text = ""; Label9.Text = "检索前"; BindGridView_Teacher(""); UpdatePanel4.Update(); }//重置