private void Bindgrid3() { GridView3.DataSource = pwp.QueryMonthPlanInfo(Convert.ToInt32(year.Text), Convert.ToInt32(month.Text), Convert.ToInt32(week.Text)); GridView3.DataBind(); UpdatePanel5.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 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(); } } }
//#region 存储GridView翻页数据主键 ///// <summary> ///// 存储GridView翻页数据主键 ///// </summary> //private void RememberOldValues(GridView gv) //{ // Dictionary<string, string[]> list = Session["PurchaseMonthPlanDetail"] as Dictionary<string, string[]>; // if (list == null) // { // Session["PurchaseMonthPlanDetail"] =new Dictionary<string, string[]>(); // list = (Dictionary<string, string[]>)Session["PurchaseMonthPlanDetail"]; // } // foreach (GridViewRow row in gv.Rows) // { // var dataKey = gv.DataKeys[row.RowIndex].Values[0] + // "," + gv.DataKeys[row.RowIndex].Values[1]; // if (Session["PurchaseMonthPlanDetail"] != null) // list = (Dictionary<string, string[]>)Session["PurchaseMonthPlanDetail"]; //很重要 // TextBox tb = row.Cells[6].FindControl("PlanPay") as TextBox; // Debug.Assert(tb != null, "tb != null"); // if (tb.Text != "") // { // if (list != null && !list.ContainsKey(dataKey)) // { // var strings = new string[2]; // strings[0] = row.Cells[5].Text; // strings[1] = tb.Text; // list.Add(dataKey, strings); // } // else if (list != null && list.ContainsKey(dataKey)) // { // list.Remove(dataKey); // var strings = new string[2]; // strings[0] = row.Cells[5].Text; // strings[1] = tb.Text; // list.Add(dataKey, strings); // } // } // if (list != null && list.Count > 0) // Session["PurchaseMonthPlanDetail"] = list; // } //} //#endregion protected void Search_Click(object sender, EventArgs e) { GridView3.DataSource = pmp.PurchaseInfo(Convert.ToInt32(DropDownList1.SelectedValue), Convert.ToInt32(DropDownList2.SelectedValue)); GridView3.DataBind(); Panel5.Visible = true; 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(); }
//#region 存储GridView翻页数据主键 ///// <summary> ///// 存储GridView翻页数据主键 ///// </summary> //private void RememberOldValues(GridView gv) //{ // Dictionary<string, string[]> list = Session["PurchaseMonthPlanDetail"] as Dictionary<string, string[]>; // if (list == null) // { // Session["PurchaseMonthPlanDetail"] =new Dictionary<string, string[]>(); // list = (Dictionary<string, string[]>)Session["PurchaseMonthPlanDetail"]; // } // foreach (GridViewRow row in gv.Rows) // { // var dataKey = gv.DataKeys[row.RowIndex].Values[0] + // "," + gv.DataKeys[row.RowIndex].Values[1]; // if (Session["PurchaseMonthPlanDetail"] != null) // list = (Dictionary<string, string[]>)Session["PurchaseMonthPlanDetail"]; //很重要 // TextBox tb = row.Cells[6].FindControl("PlanPay") as TextBox; // Debug.Assert(tb != null, "tb != null"); // if (tb.Text != "") // { // if (list != null && !list.ContainsKey(dataKey)) // { // var strings = new string[2]; // strings[0] = row.Cells[5].Text; // strings[1] = tb.Text; // list.Add(dataKey, strings); // } // else if (list != null && list.ContainsKey(dataKey)) // { // list.Remove(dataKey); // var strings = new string[2]; // strings[0] = row.Cells[5].Text; // strings[1] = tb.Text; // list.Add(dataKey, strings); // } // } // if (list != null && list.Count > 0) // Session["PurchaseMonthPlanDetail"] = list; // } //} //#endregion protected void Search_Click(object sender, EventArgs e) { GridView3.DataSource = pmp.QueryPaymentInfo(TextBox1.Text); GridView3.DataBind(); Panel5.Visible = true; UpdatePanel5.Update(); }
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 CloseReturn_Click(object sender, EventArgs e) { Panel5.Visible = false; UpdatePanel5.Update(); Panel6.Visible = false; UpdatePanel6.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 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 NewDetailSummit_Click(object sender, EventArgs e) { if (TextBox5.Text == "") { ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('预计预付款项还没填!');", true); return; } RememberOldValues(GridView3); var list = Session["PurchaseWeekPlanDetail"] as Dictionary <string, string[]>; if (list != null) { foreach (var item in list) { string[] ids = item.Key.Split(','); string id = ids[0]; string payway = ids[1]; pwp.InsertWeekPlanDetail(new Guid(WeekPlanID.Text), new Guid(id), payway, Convert.ToDecimal(item.Value[0]), Convert.ToDecimal(item.Value[1])); } } pwp.UpdatePaymentWeekPlanSum(new Guid(WeekPlanID.Text), Convert.ToDecimal(TextBox5.Text)); ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('全都增加好了哦!');", true); Panel5.Visible = false; UpdatePanel5.Update(); Bindgrid1(); }
protected void Button3_Click(object sender, EventArgs e) { if (RadioButtonList2.SelectedIndex < 0) { errorDiv2.InnerText = "Please select an answer"; } else if (RadioButtonList2.SelectedIndex == 3) { score++; questionsAnswered++; Button3.Enabled = false; RadioButtonList2.Items.FindByValue("correct").Attributes.Add("class", "right"); anchor.Visible = true; anchorA.Text = "Well done! Another easy one. We've all seen Anchorman, it's just full of memorable quotes"; UpdatePanel5.Update(); UpdatePanel6.Update(); UpdatePanel12.Update(); } else { questionsAnswered++; Button3.Enabled = false; RadioButtonList2.SelectedItem.Attributes.Add("class", "wrong"); RadioButtonList2.Items.FindByValue("correct").Attributes.Add("class", "right"); anchor.Visible = true; anchorA.Text = "Wow.. I thought everyone would get this one, It's Will Ferral as Ron Burgundy in this comedy gem"; UpdatePanel5.Update(); UpdatePanel6.Update(); UpdatePanel12.Update(); } }
protected void ChooseCra_Click(object sender, EventArgs e) { Panel5.Visible = true; GridView6.DataSource = dp.Query_PBC("%"); GridView6.DataBind(); UpdatePanel5.Update(); }
protected void SearhCra_Click(object sender, EventArgs e) { string name = TextBox18.Text; GridView6.DataSource = dp.Query_PBC(name); GridView6.DataBind(); UpdatePanel5.Update(); }
//protected void ddlChart_SelectedIndexChanged(object sender, EventArgs e) //{ // ChartMode(); //} protected void GridView5_PageIndexChanging(object sender, GridViewPageEventArgs e) { GridView5.PageIndex = e.NewPageIndex; GridView5.DataSource = Motion; GridView5.DataBind(); //ChartMode(); UpdatePanel5.Update(); }
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; if (e.CommandName == "Return") { Panel5.Visible = true; CopperID.Text = e.CommandArgument.ToString(); GridView3.DataSource = pmc.Query_CopperReturn(new Guid(CopperID.Text)); GridView3.DataBind(); Debug.Assert(row != null, "Oh My LadyGaga!"); Label16.Text = row.Cells[2].Text; Label20.Text = row.Cells[10].Text; UpdatePanel5.Update(); } if (e.CommandName == "NG") { Panel7.Visible = true; CopperID.Text = e.CommandArgument.ToString(); GridView4.DataSource = pmc.Query_CopperNG(new Guid(CopperID.Text)); GridView4.DataBind(); Label15.Text = row.Cells[2].Text; Label17.Text = row.Cells[10].Text; UpdatePanel7.Update(); } if (e.CommandName == "Modi") { CopperID.Text = e.CommandArgument.ToString(); Label4.Text = "修改"; LabelUsage.Visible = true; TextBox47.Visible = true; TextBox47.Text = row.Cells[12].Text; Panel3.Visible = true; UpdatePanel3.Update(); Type.Text = row.Cells[3].Text; Mid.Text = row.Cells[11].Text; TextBox3.Text = row.Cells[5].Text; TextBox6.Text = row.Cells[4].Text; TextBox46.Text = row.Cells[9].Text; ProviderName.Text = row.Cells[2].Text; ProviderID.Text = row.Cells[10].Text; CopperRate.Text = row.Cells[12].Text; } if (e.CommandName == "OEM") { Panel10.Visible = true; CopperID.Text = e.CommandArgument.ToString(); GridView6.DataSource = pmc.Query_CopperOEM(new Guid(CopperID.Text)); GridView6.DataBind(); UpdatePanel10.Update(); } }
protected void NewMonthPlan_Click(object sender, EventArgs e) { Panel4.Visible = true; UpdatePanel4.Update(); Panel5.Visible = false; UpdatePanel5.Update(); Panel6.Visible = false; UpdatePanel6.Update(); }
protected void UnitCheck_Click(object sender, EventArgs e) { Panel5.Visible = true; Panel54.Visible = true; GridView9.DataSource = bom.Query_MAllUnit(new Guid(Label38.Text)); GridView9.DataBind(); UpdatePanel5.Update(); }
protected void SearchE_Click(object sender, EventArgs e) { string name = TextBox3.Text; GridView3.DataSource = ele.Query(name,new Guid(HSFID.Text)); GridView3.DataBind(); GridView3.SelectedIndex = -1; UpdatePanel4.Update(); Panel5.Visible = false; UpdatePanel5.Update(); }
protected void Button33_Click(object sender, EventArgs e) { GridView4.DataSource = bom.Query_PBC(TextBox16.Text); GridView4.DataBind(); Panel51.Visible = true; Panel52.Visible = false; Panel53.Visible = false; Panel5.Visible = true; UpdatePanel5.Update(); Panel6.Visible = false; UpdatePanel6.Update(); }
protected void Btn_WOTrack_Close_Click(object sender, EventArgs e) { //随工单信息pannel隐藏 Panel4.Visible = false; TextBox20.Text = ""; TextBox21.Text = ""; label_Order.Text = ""; UpdatePanel4.Update(); Panel5.Visible = false; UpdatePanel5.Update(); }
protected void GridView2_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Details") { PMBID.Text = e.CommandArgument.ToString(); GridView3.DataSource = pb.Query_BillDetail(new Guid(PMBID.Text)); GridView3.DataBind(); Panel5.Visible = true; UpdatePanel5.Update(); } }
protected void Button38_Click(object sender, EventArgs e) { GridView5.DataSource = bom.Query_Material(TextBox21.Text, TextBox22.Text); GridView5.DataBind(); Panel51.Visible = false; Panel5.Visible = true; Panel52.Visible = true; Panel53.Visible = false; Panel6.Visible = false; UpdatePanel5.Update(); UpdatePanel6.Update(); }
//确认新建计划 protected void ConfirmNewPlanMain(object sender, EventArgs e) { string man = Session["UserName"].ToString(); int year = Convert.ToInt32(DropDownList8.SelectedValue.ToString()); int month = Convert.ToInt32(DropDownList9.SelectedValue.ToString()); pp.Insert_PlanMain(year, month, man); ScriptManager.RegisterClientScriptBlock(Page, GetType(), "alert", "alert('新建成功!')", true); Panel6.Visible = false; UpdatePanel5.Update(); BindPlanMain(); }
private void BuscarAgencias() { lstAgencia.DataSource = (DsAgencias.DatosRow[])dtAgencias.Select("Nombre like '%" + this.txtRazonSocialBusqueda.Text + "%'", "Nombre"); lstAgencia.DataTextField = "Nombre"; lstAgencia.DataValueField = "AgenciaID"; lstAgencia.DataBind(); lstPuntoRecepcion.DataSource = dtPuntosRecepcion.Select("RazonSocial LIKE '%" + this.txtPuntoRecepcionBusquedaNombre.Text + "%'", "RazonSocial"); lstPuntoRecepcion.DataTextField = "RazonSocial"; lstPuntoRecepcion.DataValueField = "PuntoRecepcionID"; lstPuntoRecepcion.DataBind(); UpdatePanel6.Update(); UpdatePanel5.Update(); }
protected void ibtnListarTelefonoDeudor_Click(object sender, ImageClickEventArgs e) { try { buscarTelefono(); ScriptManager.RegisterStartupScript(UpdatePanel5, UpdatePanel5.GetType(), "show", "$(function () { $('#" + Panel4.ClientID + "').modal('show'); });", true); UpdatePanel5.Update(); } catch (Exception ex) { divAlerta.Visible = true; lblInfo.Text = ex.Message; } }
protected void GridView3_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Details") { var row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; GridView3.SelectedIndex = row.RowIndex; ReportID.Text = e.CommandArgument.ToString(); GridView4.DataSource = hd.QueryDetail(Guid.Empty, new Guid(ReportID.Text)); GridView4.DataBind(); Panel5.Visible = true; UpdatePanel5.Update(); } if (e.CommandName == "De") { int a = hd.DeleteReport(new Guid(e.CommandArgument.ToString())); if (a > 0) { ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('删除成功!');", true); } else { ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('失败了诶...');", true); } GridView3.DataSource = hd.QueryReport(new Guid(VersionID.Text)); GridView3.DataBind(); GridView2.DataSource = hd.QueryVersion(new Guid(HSFID.Text)); GridView2.DataBind(); UpdatePanel3.Update(); } if (e.CommandName == "Modify") { var row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; GridView3.SelectedIndex = row.RowIndex; ReportID.Text = e.CommandArgument.ToString(); GridView9.DataSource = hd.QueryDetail(new Guid(VersionID.Text), Guid.Empty); GridView9.DataBind(); Panel9.Visible = true; UpdatePanel9.Update(); } if (e.CommandName == "ED") { var row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; GridView3.SelectedIndex = row.RowIndex; ReportID.Text = e.CommandArgument.ToString(); Label1.Text = "编辑"; Panel8.Visible = true; UpdatePanel8.Update(); } }
protected void Button21_Click(object sender, EventArgs e) { Panel31.Visible = true; Label11.Text = "新增"; Label12.Text = Label2.Text; Panel4.Visible = false; Panel41.Visible = false; Panel5.Visible = false; Panel51.Visible = false; Panel6.Visible = false; UpdatePanel6.Update(); UpdatePanel3.Update(); UpdatePanel4.Update(); UpdatePanel5.Update(); }
protected void GridView6_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Choose") { GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; Label3.Text = row.Cells[1].Text; craid.Text = e.CommandArgument.ToString(); Panel5.Visible = false; UpdatePanel3.Update(); UpdatePanel5.Update(); } }
protected void GridView2_PageIndexChanging(object sender, GridViewPageEventArgs e) { GridView theGrid = sender as GridView; // refer to the GridView int newPageIndex = 0; GridView2.SelectedIndex = -1; if (-1 == e.NewPageIndex) { TextBox txtNewPageIndex = null; GridViewRow pagerRow = GridView2.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 >= GridView2.PageCount ? GridView2.PageCount - 1 : newPageIndex; GridView2.PageIndex = newPageIndex; GridView2.PageIndex = newPageIndex; GridView2.SelectedIndex = -1; databind2(); //pannel 各种隐藏 //pannel 各种隐藏 Panel2.Visible = false; UpdatePanel2.Update(); Panel3.Visible = false; TextBox5.Text = ""; TextBox7.Text = ""; TextBox12.Text = ""; TextBox11.Text = ""; TextBox8.Text = ""; TextBox3.Text = ""; Panel5.Visible = false; UpdatePanel5.Update(); }