protected void btnEdit_Click(object sender, EventArgs e)// { Button btn = (Button)sender; int rowIndex = ((GridViewRow)btn.NamingContainer).RowIndex; string projcode = GridView1.DataKeys[rowIndex].Value.ToString(); string query = "select * from ht_qlt_inspect_proj where INSPECT_CODE = '" + projcode + "' and is_del = '0'"; MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); DataSet data = opt.CreateDataSetOra(query); if (data != null && data.Tables[0].Rows.Count > 0) { txtCode.Text = data.Tables[0].Rows[0]["INSPECT_CODE"].ToString(); txtName.Text = data.Tables[0].Rows[0]["INSPECT_NAME"].ToString(); listType2.SelectedValue = data.Tables[0].Rows[0]["INSPECT_TYPE"].ToString(); if (listType2.SelectedValue == "0") { opt.bindDropDownList(listSection2, "select Section_code,Section_name from ht_pub_tech_section where is_valid = '1' and is_del = '0' order by section_code", "Section_name", "Section_code"); } else { opt.bindDropDownList(listSection2, "select ID,Name from ht_inner_inspect_group t", "Name", "ID"); } listSection2.SelectedValue = data.Tables[0].Rows[0]["INSPECT_GROUP"].ToString(); txtRemark.Text = data.Tables[0].Rows[0]["REMARK"].ToString(); listCreator.SelectedValue = data.Tables[0].Rows[0]["CREATE_ID"].ToString(); txtUnit.Text = data.Tables[0].Rows[0]["UNIT"].ToString(); } ScriptManager.RegisterStartupScript(UpdatePanel2, this.Page.GetType(), "", " $('.shade').fadeIn(200);", true); }
protected void Page_Load(object sender, EventArgs e) { base.PageLoad(sender, e); if (!IsPostBack) { txtStart.Text = System.DateTime.Now.AddDays(-15).ToString("yyyy-MM-dd"); txtStop.Text = System.DateTime.Now.AddDays(45).ToString("yyyy-MM-dd"); MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); opt.bindDropDownList(listEq, "select IDKEY,EQ_NAME from ht_eq_eqp_tbl where is_del = '0' and is_valid = '1' order by IDKEY", "EQ_NAME", "IDKEY"); opt.bindDropDownList(listOptor, "select ID,name from ht_svr_user t where is_del ='0' ", "name", "ID"); opt.bindDropDownList(listArea, "select r.section_code,r.section_name from ht_pub_tech_section r where r.is_del = '0' and r.is_valid = '1' union select '' as section_code,'' as section_name from dual order by section_code", "section_name", "section_code"); try { string equip = Request.QueryString["Equip"]; if (equip != null) { hideequip.Value = equip; } bindGrid(); } catch { } } }
protected void bindData3(string paracode) { try { string query = "select * from HT_PUB_TECH_PARA where PARA_CODE = '" + paracode + "'"; MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); DataSet data = opt.CreateDataSetOra(query); if (data != null && data.Tables[0].Rows.Count > 0) { DataRow row = data.Tables[0].Rows[0]; txtCode.Text = paracode; txtName.Text = row["PARA_NAME"].ToString(); txtUnit.Text = row["PARA_UNIT"].ToString(); txtSetTag.Text = row["SET_TAG"].ToString(); txtValueTag.Text = row["VALUE_TAG"].ToString(); setType(row["PARA_TYPE"].ToString()); txtDscrp.Text = row["REMARK"].ToString(); rdValid.Checked = ("1" == row["IS_VALID"].ToString()); opt.bindDropDownList(listEquip, "select EQ_NAME,IDKEY from ht_eq_eqp_tbl t where t.section_code = '" + txtCode.Text.Substring(0, 5) + "'", "EQ_NAME", "IDKEY"); listEquip.SelectedValue = row["EQUIP_CODE"].ToString(); listSection.SelectedValue = paracode.Substring(0, 5); listApt.SelectedValue = row["BUSS_ID"].ToString(); opt.bindDropDownList(listPathnode, "select nodename,id from ht_pub_path_node t where section_code = '" + listSection.SelectedValue + "' and is_del = '0'", "nodename", "id"); listPathnode.SelectedValue = row["PATH_NODE"].ToString(); } } catch (Exception error) { ScriptManager.RegisterStartupScript(UpdatePanel4, this.Page.GetType(), "error", "<Script>alert('" + error.Message + "')</Script>", false); } }
protected void Page_Load(object sender, EventArgs e) { base.PageLoad(sender, e); if (!IsPostBack) { MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); opt.bindDropDownList(listApt, "select F_CODE,F_NAME from HT_SVR_ORG_GROUP", "F_NAME", "F_CODE"); opt.bindDropDownList(listRole, "select * from ht_svr_sys_role t", "F_ROLE", "F_ID"); opt.bindDropDownList(listTeam, "select team_code,team_name from ht_sys_team t where t.is_del = '0' order by team_code", "team_name", "team_code"); if (Session["User"] != null) { SysUser user = (SysUser)Session["User"]; txtID.Text = user.id; txtName.Text = user.text; listApt.SelectedValue = user.OwningBusinessUnitId; listRole.SelectedValue = user.UserRoleID; DataSet dt = opt.CreateDataSetOra("select * from ht_svr_user where ID = '" + txtID.Text + "'"); if (dt != null && dt.Tables[0].Rows.Count > 0) { DataRow row = dt.Tables[0].Rows[0]; txtPhone.Text = row["MOBILE"].ToString(); txtCallNO.Text = row["PHONE"].ToString(); txtFax.Text = row["RTXID"].ToString(); setGender(row["GENDER"].ToString()); listTeam.SelectedValue = row["TEAM_CODE"].ToString(); txtEmail.Text = row["EMAIL"].ToString(); txtDscp.Text = row["DESCRIPTION"].ToString(); } } } }
protected void btnModify_Click(object sender, EventArgs e) { MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); string[] seg = { "QLT_CODE", "QLT_NAME", "STANDARD_VOL", "B_DATE", "E_DATE", "CREATE_ID", "CREATE_DATE", "REMARK" }; string[] value = { txtCode.Text, txtName.Text, txtVersion.Text, txtExeDate.Text, txtEndDate.Text, ((MSYS.Data.SysUser)Session["User"]).id, txtCrtDate.Text, txtDscpt.Text, }; string log_message; if (opt.MergeInto(seg, value, 1, "HT_QLT_STDD_CODE") == "Success") { log_message = "保存质量考核标准成功"; opt.bindDropDownList(listVersion, "select QLT_CODE,QLT_NAME from ht_qlt_STDD_CODE where is_valid = '1' and is_del= '0'", "QLT_NAME", "QLT_CODE"); opt.bindDropDownList(listtech, "select QLT_CODE,QLT_NAME from ht_qlt_STDD_CODE where is_valid = '1' and is_del= '0'", "QLT_NAME", "QLT_CODE"); opt.bindDropDownList(listtechC, "select QLT_CODE,QLT_NAME from ht_qlt_STDD_CODE where is_valid = '1' and is_del= '0'", "QLT_NAME", "QLT_CODE"); listAprv.SelectedValue = "-1"; } else { log_message = "保存质量考核标准失败"; } log_message += "--数据详情:" + string.Join(",", value); InsertTlog(log_message); }
protected void initView() { MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); opt.bindDropDownList(listVersion, "select TECH_CODE,TECH_NAME from HT_TECH_STDD_CODE where is_valid = '1' and is_del= '0'", "TECH_NAME", "TECH_CODE"); opt.bindDropDownList(listtech, "select * from HT_TECH_STDD_CODE where is_valid = '1' and is_del = '0'", "TECH_NAME", "TECH_CODE"); opt.bindDropDownList(listtechC, "select * from HT_TECH_STDD_CODE where is_valid = '1' and is_del = '0'", "TECH_NAME", "TECH_CODE"); }
protected void bindGrid2(string code) { string query = "select t.section as 工段,t.equipment_id as 设备名称,t.point as 数据点,t.OLDVALUE as 原值,t.POINTVALUE as 校准值,t.SAMPLE_TIME as 校准时间,t.STATUS as 状态,t.remark as 备注 ,t.ID from HT_EQ_MCLBR_PLAN_detail t where t.main_id = '" + code + "' and t.is_del = '0'"; MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); DataSet data = opt.CreateDataSetOra(query); GridView2.DataSource = data; GridView2.DataBind(); if (data != null && data.Tables[0].Rows.Count > 0) { for (int i = GridView2.PageSize * GridView2.PageIndex; i < GridView2.PageSize * (GridView2.PageIndex + 1) && i < data.Tables[0].Rows.Count; i++) { int j = i - GridView2.PageSize * GridView2.PageIndex; DataRowView mydrv = data.Tables[0].DefaultView[i]; GridViewRow row = GridView2.Rows[j]; DropDownList list1 = (DropDownList)row.FindControl("listGridsct"); DropDownList list2 = (DropDownList)row.FindControl("listGridEq"); DropDownList list3 = (DropDownList)row.FindControl("listGridPoint"); list1.SelectedValue = mydrv["工段"].ToString(); opt.bindDropDownList(list2, "select IDKEY,EQ_NAME from ht_eq_eqp_tbl where section_code = '" + list1.SelectedValue + "' order by idkey", "EQ_NAME", "IDKEY"); list2.SelectedValue = mydrv["设备名称"].ToString(); opt.bindDropDownList(list3, "select para_code,para_name from ht_pub_tech_para where equip_code = '" + list2.SelectedValue + "' order by para_code ", "para_name", "para_code"); list3.SelectedValue = mydrv["数据点"].ToString(); ((TextBox)row.FindControl("txtGridOldvalue")).Text = mydrv["原值"].ToString(); ((TextBox)row.FindControl("txtGridNewvalue")).Text = mydrv["校准值"].ToString(); ((TextBox)row.FindControl("txtGridClbrtime")).Text = mydrv["校准时间"].ToString(); ((DropDownList)row.FindControl("listGrid2Status")).SelectedValue = mydrv["状态"].ToString(); ((TextBox)row.FindControl("txtGridremark")).Text = mydrv["备注"].ToString(); } } }//绑定GridView2数据源
protected void initView() { MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); opt.bindDropDownList(listtype, "select distinct ID,inspect_type from ht_inner_bool_display t", "inspect_type", "ID"); opt.bindDropDownList(listType2, "select distinct ID,inspect_type from ht_inner_bool_display t", "inspect_type", "ID"); opt.bindDropDownList(listCreator, "select s.name,s.id from ht_svr_sys_role t left join ht_svr_sys_menu r on substr(t.f_right,r.f_id,1) = '1' left join ht_svr_user s on s.role = t.f_id where r.f_id = '" + this.RightId + "' union select q.name,q.id from ht_svr_sys_role t left join ht_svr_sys_menu r on substr(t.f_right,r.f_id,1) = '1' left join ht_svr_org_group s on s.f_role = t.f_id left join ht_svr_user q on q.levelgroupid = s.f_code where r.f_id = '" + this.RightId + "' order by id desc", "Name", "ID"); }
protected void btnAdd_Click(object sender, EventArgs e) { if (listtype.SelectedValue != "" && listSection.SelectedValue != "") { listType2.SelectedValue = listtype.SelectedValue; MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); if (listType2.SelectedValue == "0") { opt.bindDropDownList(listSection2, "select Section_code,Section_name from ht_pub_tech_section where is_valid = '1' and is_del = '0' order by section_code", "Section_name", "Section_code"); } else { opt.bindDropDownList(listSection2, "select ID,Name from ht_inner_inspect_group t", "Name", "ID"); } listSection2.SelectedValue = listSection.SelectedValue; string temp = opt.GetSegValue("select nvl(max(substr(inspect_code,10,3)),0) + 1 as code from Ht_Qlt_Inspect_Proj where inspect_type = '" + listtype.SelectedValue + "' and inspect_group = '" + listSection.SelectedValue + "'", "code"); txtCode.Text = "703" + listtype.SelectedValue + listSection.SelectedValue.PadLeft(5, '0') + temp.PadLeft(3, '0'); listCreator.SelectedValue = ((MSYS.Data.SysUser)Session["User"]).id; txtName.Text = ""; ScriptManager.RegisterStartupScript(UpdatePanel2, this.Page.GetType(), "", " $('.shade').fadeIn(200);", true); } else { ScriptManager.RegisterStartupScript(UpdatePanel2, this.Page.GetType(), "noselect", "alert('请选择检查项目类型及所属分组');", true); } }
protected void btnModify1_Click(object sender, EventArgs e) { MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); { string[] seg = { "SECTION_CODE", "SECTION_NAME", "REMARK", "IS_PATH_CONFIG", "CREATE_ID", "CREATE_TIME" }; string[] value = { txtCode_1.Text, txtName_1.Text, txtDscrp_1.Text, Convert.ToInt16(rdValid_1.Checked).ToString(), ((MSYS.Data.SysUser)Session["user"]).id, System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") }; string log_message; if (opt.MergeInto(seg, value, 1, "HT_PUB_TECH_SECTION") == "Success") { log_message = "保存工艺段成功"; tvHtml = InitTree(); opt.bindDropDownList(listSection_2, "select section_code,section_name from ht_pub_tech_section where is_del = '0' and is_valid = '1' order by section_code", "section_name", "section_code"); opt.bindDropDownList(listSection, "select section_code,section_name from ht_pub_tech_section where is_valid = '1' and is_del = '0' order by section_code", "section_name", "section_code"); string[] procseg = { }; object[] procvalues = { }; opt.ExecProcedures("Create_Online_month_Report", procseg, procvalues); ScriptManager.RegisterStartupScript(UpdatePanel4, this.Page.GetType(), "sucess", "initTree();alert('保存成功');", true); } else { log_message = "保存工艺段失败"; } log_message += "--数据详情:" + string.Join("-", value); InsertTlog(log_message); } }
protected void btnDel1_Click(object sender, EventArgs e) { MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); List <string> commandlist = new List <string>(); commandlist.Add("update HT_PUB_TECH_SECTION set IS_DEL = '1' where SECTION_CODE = '" + txtCode_1.Text + "'"); //commandlist.Add("update ht_pub_inspect_process set IS_DEL = '1' where substr(PROCESS_CODE,1,5) = '" + txtCode.Text + "'"); commandlist.Add("update HT_PUB_TECH_PARA set IS_DEL = '1' where substr(PARA_CODE,1,5) = '" + txtCode_1.Text + "'"); string log_message; if (opt.TransactionCommand(commandlist) == "Success") { log_message = "删除工艺段成功"; tvHtml = InitTree(); opt.bindDropDownList(listSection_2, "select section_code,section_name from ht_pub_tech_section where is_del = '0' and is_valid = '1' order by section_code", "section_name", "section_code"); opt.bindDropDownList(listSection, "select section_code,section_name from ht_pub_tech_section where is_valid = '1' and is_del = '0' order by section_code", "section_name", "section_code"); string[] procseg = { }; object[] procvalues = { }; opt.ExecProcedures("Create_Online_month_Report", procseg, procvalues); ScriptManager.RegisterStartupScript(UpdatePanel4, this.Page.GetType(), "sucess", "initTree();alert('删除成功');", true); } else { log_message = "删除工艺段失败"; } log_message += ",工艺段ID:" + txtCode_1.Text; InsertTlog(log_message); }
protected void bindGrid2() { //string query = "select r.inspect_type as 检查类型,r.inspect_group as 分组, r.inspect_code as 检查项目编码,j.upper_value as 上限 ,j.lower_value as 下限,j.minus_score as 单次扣分,j.REMARK as 备注 from ht_qlt_inspect_proj r left join HT_QLT_INSPECT_STDD_SUB j on j.inspect_code = r.inspect_code where j.stdd_code = '" + listVersion.SelectedValue + "' and r.is_del = '0' and r.is_valid = '1' and r.inspect_type = '0' order by r.inspect_code"; string query = "select r.inspect_type as 检查类型,r.inspect_group as 分组, r.inspect_code as 检查项目编码,j.upper_value as 上限 ,j.lower_value as 下限,j.minus_score as 单次扣分,j.REMARK as 备注 from ht_qlt_inspect_proj r left join HT_QLT_INSPECT_STDD_SUB j on j.inspect_code = r.inspect_code where j.stdd_code = '" + listVersion.SelectedValue + "' and r.is_del = '0' and r.is_valid = '1' and r.inspect_type = '0' union select r.inspect_type as 检查类型,r.inspect_group as 分组, r.inspect_code as 检查项目编码,0 as 上限 ,0 as 下限,0 as 单次扣分,'' as 备注 from ht_qlt_inspect_proj r where r.is_del = '0' and r.is_valid = '1' and r.inspect_type = '0' and r.inspect_code in (select inspect_code from ht_qlt_inspect_proj where r.is_del = '0' and r.is_valid = '1' and r.inspect_type = '0' minus select inspect_code from HT_QLT_INSPECT_STDD_SUB where IS_DEL = '0' and stdd_code = '" + listVersion.SelectedValue + "') order by 检查项目编码"; MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); DataSet data = opt.CreateDataSetOra(query); GridView2.DataSource = data; GridView2.DataBind(); if (data != null && data.Tables[0].Rows.Count > 0) { for (int i = GridView2.PageSize * GridView2.PageIndex; i < GridView2.PageSize * (GridView2.PageIndex + 1) && i < data.Tables[0].Rows.Count; i++) { int j = i - GridView2.PageSize * GridView2.PageIndex; DataRowView mydrv = data.Tables[0].DefaultView[i]; GridViewRow row = GridView2.Rows[j]; DropDownList list = (DropDownList)row.FindControl("listGroup"); opt.bindDropDownList(list, "select Section_code,Section_name from ht_pub_tech_section where is_valid = '1' and is_del = '0' order by section_code", "Section_name", "Section_code"); list.SelectedValue = mydrv["分组"].ToString(); DropDownList list2 = (DropDownList)row.FindControl("listInspect"); opt.bindDropDownList(list2, "select inspect_code,inspect_name from ht_qlt_inspect_proj where inspect_group = '" + list.SelectedValue + "' and is_del = '0'", "inspect_name", "inspect_code"); ((DropDownList)row.FindControl("listInspect")).SelectedValue = mydrv["检查项目编码"].ToString(); ((TextBox)row.FindControl("txtUpper")).Text = mydrv["上限"].ToString(); ((TextBox)row.FindControl("txtLower")).Text = mydrv["下限"].ToString(); ((TextBox)row.FindControl("txtScore")).Text = mydrv["单次扣分"].ToString(); ((TextBox)row.FindControl("txtRemark")).Text = mydrv["备注"].ToString(); } } }
protected void initView() { MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); opt.bindDropDownList(listVersion, "select INSPECT_STDD_NAME,INSPECT_STDD_CODE from HT_QLT_INSPECT_STDD where is_valid = '1' and is_del= '0'", "INSPECT_STDD_NAME", "INSPECT_STDD_CODE"); opt.bindDropDownList(listtech, "select INSPECT_STDD_NAME,INSPECT_STDD_CODE from HT_QLT_INSPECT_STDD where is_valid = '1' and is_del= '0'", "INSPECT_STDD_NAME", "INSPECT_STDD_CODE"); opt.bindDropDownList(listtechC, "select INSPECT_STDD_NAME,INSPECT_STDD_CODE from HT_QLT_INSPECT_STDD where is_valid = '1' and is_del= '0'", "INSPECT_STDD_NAME", "INSPECT_STDD_CODE"); }
protected void Page_Load(object sender, EventArgs e) { base.PageLoad(sender, e); if (!IsPostBack) { txtStartDate.Text = System.DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"); txtStopDate.Text = System.DateTime.Now.ToString("yyyy-MM-dd"); MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); opt.bindDropDownList(listShift, "select t.shift_code,t.shift_name from ht_sys_shift t where t.is_valid = '1' and t.is_del = '0' order by t.shift_code", "shift_name", "shift_code"); opt.bindDropDownList(listTeam, "select t.team_code,t.team_name from ht_sys_team t where t.is_valid = '1' and t.is_del = '0' order by t.team_code", "team_name", "team_code"); opt.bindDropDownList(listolder, "select s.name,s.id from ht_svr_sys_role t left join ht_svr_sys_menu r on substr(t.f_right,r.f_id,1) = '1' left join ht_svr_user s on s.role = t.f_id where r.f_id = '" + this.RightId + "' union select q.name,q.id from ht_svr_sys_role t left join ht_svr_sys_menu r on substr(t.f_right,r.f_id,1) = '1' left join ht_svr_org_group s on s.f_role = t.f_id left join ht_svr_user q on q.levelgroupid = s.f_code where r.f_id = '" + this.RightId + "' order by id desc", "name", "ID"); opt.bindDropDownList(listnewer, "select s.name,s.id from ht_svr_sys_role t left join ht_svr_sys_menu r on substr(t.f_right,r.f_id,1) = '1' left join ht_svr_user s on s.role = t.f_id where r.f_id = '" + this.RightId + "' union select q.name,q.id from ht_svr_sys_role t left join ht_svr_sys_menu r on substr(t.f_right,r.f_id,1) = '1' left join ht_svr_org_group s on s.f_role = t.f_id left join ht_svr_user q on q.levelgroupid = s.f_code where r.f_id = '" + this.RightId + "' order by id desc", "name", "ID"); if (((MSYS.Data.SysUser)Session["user"]).UserRole == "生产处电气维修") { rdElec.Enabled = false; rdMchnc.Enabled = false; rdElec.Checked = true; rdMchnc.Checked = false; } else if (((MSYS.Data.SysUser)Session["user"]).UserRole == "生产处机械维修") { rdElec.Enabled = false; rdMchnc.Enabled = false; rdElec.Checked = false; rdMchnc.Checked = true; } else { rdElec.Enabled = true; rdMchnc.Enabled = true; } bindGrid1(); } }
protected void btnEdit_Click(object sender, EventArgs e)// { try { Button btn = (Button)sender; int rowIndex = ((GridViewRow)btn.NamingContainer).RowIndex; MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); energyConsumptionPoint.SelectedIndex = energyConsumptionPoint.Items.IndexOf(energyConsumptionPoint.Items.FindByText(GridView1.Rows[rowIndex].Cells[2].Text)); //GridView1.Rows[rowIndex].Cells[2].Text; opt.bindDropDownList(processName, "SELECT DISTINCT PROCESS_CODE, PROCESS_NAME FROM HT_ENG_CONSUMPTION_ITEM WHERE IS_DEL=0 AND ENG_CODE=" + energyConsumptionPoint.SelectedValue.ToString(), "PROCESS_NAME", "PROCESS_CODE"); //processName.SelectedItem.Text = GridView1.Rows[rowIndex].Cells[3].Text; processName.SelectedIndex = processName.Items.IndexOf(processName.Items.FindByText(GridView1.Rows[rowIndex].Cells[3].Text)); opt.bindDropDownList(department, "SELECT DISTINCT UNIT_CODE ,UNIT_NAME FROM HT_ENG_CONSUMPTION_ITEM WHERE IS_DEL =0 AND ENG_CODE = " + energyConsumptionPoint.SelectedValue.ToString() + " AND PROCESS_CODE=" + processName.SelectedValue.ToString(), "UNIT_NAME", "UNIT_CODE"); //department.SelectedItem.Text = GridView1.Rows[rowIndex].Cells[6].Text; department.SelectedIndex = department.Items.IndexOf(department.Items.FindByText(GridView1.Rows[rowIndex].Cells[6].Text)); consumeID.Text = GridView1.Rows[rowIndex].Cells[1].Text; Time.Text = GridView1.Rows[rowIndex].Cells[4].Text; energyConsumption.Text = GridView1.Rows[rowIndex].Cells[5].Text; System.Diagnostics.Debug.WriteLine("edit" + energyConsumptionPoint.SelectedItem.Value); if (GridView1.Rows[rowIndex].Cells[7].Text == "是") { rdValid.Checked = true; } else { rdValid.Checked = false; } UpdatePanel1.Update(); } catch (Exception ee) { Response.Write(ee.Message); } }
protected void listSection_SelectedIndexChanged(object sender, EventArgs e) { MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); opt.bindDropDownList(listEquip, "select EQ_NAME,IDKEY from ht_eq_eqp_tbl t where t.Section_code = '" + listSection.SelectedValue + "' and t.is_del = '0'", "EQ_NAME", "IDKEY"); opt.bindDropDownList(listPathnode, "select nodename,id from ht_pub_path_node t where section_code = '" + listSection.SelectedValue + "' and is_del = '0'", "nodename", "id"); txtCode.Text = ""; }
protected void BindData() { MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); string query = "SELECT DISTINCT ENG_CODE, ENG_NAME FROM HT_ENG_CONSUMPTION_ITEM WHERE IS_VALID=1 AND IS_DEL !=1"; opt.bindDropDownList(ENG_NAME, query, "ENG_NAME", "ENG_CODE"); opt.bindDropDownList(PROCESS_NAME, "SELECT DISTINCT PROCESS_CODE ,PROCESS_NAME FROM HT_ENG_CONSUMPTION_ITEM WHERE IS_VALID=1 AND IS_DEL !=1", "PROCESS_NAME", "PROCESS_CODE"); opt.bindDropDownList(UNIT_NAME, "SELECT DISTINCT UNIT_CODE, UNIT_NAME FROM HT_ENG_CONSUMPTION_ITEM WHERE IS_VALID=1 AND IS_DEL!=1", "UNIT_NAME", "UNIT_CODE"); }
protected void initView() { MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); opt.bindDropDownList(listProd, "select prod_code,prod_name from ht_pub_prod_design where is_del = '0' and is_valid = '1' order by prod_code", "prod_name", "prod_code"); opt.bindDropDownList(listProd2, "select prod_code,prod_name from ht_pub_prod_design where is_del = '0' and is_valid = '1' order by prod_code", "prod_name", "prod_code"); opt.bindDropDownList(listTeam, "select team_code,team_name from ht_sys_team where is_del = '0' and is_valid = '1' order by team_code", "team_name", "team_code"); opt.bindDropDownList(listTeam2, "select team_code,team_name from ht_sys_team where is_del = '0' and is_valid = '1' order by team_code", "team_name", "team_code"); }
protected void Page_Load(object sender, EventArgs e) { base.PageLoad(sender, e); if (!IsPostBack) { MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); opt.bindDropDownList(listPrt1, "select mattree_code,mattree_name,PARENT_CODE from ht_pub_mattree where is_del = '0' order by PARENT_CODE", "mattree_name", "mattree_code"); opt.bindDropDownList(listType2, "select MATTREE_CODE , MATTREE_NAME , PARENT_CODE from HT_PUB_MATTREE where is_del = '0' order by PARENT_CODE", "MATTREE_NAME", "MATTREE_CODE"); tvHtml = InitTree(); } }
protected void Page_Load(object sender, EventArgs e) { base.PageLoad(sender, e); if (!IsPostBack) { MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); opt.bindDropDownList(listProd, "select prod_code,prod_name,CREATE_TIME from ht_pub_prod_design where is_del = '0' and is_valid = '1' order by CREATE_TIME", "prod_name", "prod_code"); opt.bindDropDownList(listTeam, "select team_code,team_name from ht_sys_team where is_del = '0' and is_valid = '1' order by team_code", "team_name", "team_code"); } tvHtml = InitTree("生产"); }
protected void Page_Load(object sender, EventArgs e) { base.PageLoad(sender, e); if (!IsPostBack) { MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); opt.bindDropDownList(listRole, "select * from ht_svr_sys_role t", "F_ROLE", "F_ID"); opt.bindDropDownList(listParent, "select f_code,F_name from ht_svr_org_group where substr(F_CODE,7,2) = '00'", "F_NAME", "F_CODE"); bindData(); } }
protected void Page_Load(object sender, EventArgs e) { base.PageLoad(sender, e); if (!IsPostBack) { MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); opt.bindDropDownList(listSection, "select section_code,section_name from ht_pub_tech_section where is_del = '0' and is_valid = '1' order by section_code ", "section_name", "section_code"); opt.bindDropDownList(listEq, "select IDKEY,EQ_NAME from ht_eq_eqp_tbl where is_del = '0' and is_valid = '1'", "EQ_NAME", "IDKEY"); bindGrid(); } }
protected void initView() { MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); txtRecordtime.Text = System.DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"); txtEndtime.Text = System.DateTime.Now.ToString("yyyy-MM-dd"); opt.bindDropDownList(listProd, "select prod_code,prod_name from ht_pub_prod_design where is_del = '0' and is_valid = '1' order by prod_code", "prod_name", "prod_code"); opt.bindDropDownList(listProd2, "select prod_code,prod_name from ht_pub_prod_design where is_del = '0' and is_valid = '1' order by prod_code", "prod_name", "prod_code"); opt.bindDropDownList(listTeam, "select team_code,team_name from ht_sys_team where is_del = '0' and is_valid = '1' order by team_code", "team_name", "team_code"); opt.bindDropDownList(listTeam2, "select team_code,team_name from ht_sys_team where is_del = '0' and is_valid = '1' order by team_code", "team_name", "team_code"); bindGrid(); }
protected void Page_Load(object sender, EventArgs e) { base.PageLoad(sender, e); if (!IsPostBack) { MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); opt.bindDropDownList(listApt, "select F_CODE,F_NAME from HT_SVR_ORG_GROUP", "F_NAME", "F_CODE"); opt.bindDropDownList(listRole, "select * from ht_svr_sys_role t", "F_ROLE", "F_ID"); opt.bindDropDownList(listTeam, "select team_code,team_name from ht_sys_team t where t.is_del = '0' order by team_code", "team_name", "team_code"); bindData(); } }
protected void listType2_SelectedIndexChanged(object sender, EventArgs e) { MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); if (listType2.SelectedValue == "0") { opt.bindDropDownList(listSection2, "select Section_code,Section_name from ht_pub_tech_section where is_valid = '1' and is_del = '0' order by section_code", "Section_name", "Section_code"); } else { opt.bindDropDownList(listSection2, "select ID,Name from ht_inner_inspect_group t", "Name", "ID"); } }
protected void Page_Load(object sender, EventArgs e) { base.PageLoad(sender, e); if (!IsPostBack) { MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); opt.bindDropDownList(listPro, "select PROD_CODE,PROD_NAME from ht_pub_prod_design t where is_del = '0' ", "PROD_NAME", "PROD_CODE"); opt.bindDropDownList(listStatus, "select * from HT_INNER_BOOL_DISPLAY t", "CTRL_NAME", "ID"); opt.bindDropDownList(listCrtApt, "select F_CODE,F_NAME from ht_svr_org_group ", "F_NAME", "F_CODE"); opt.bindDropDownList(listCreator, "select s.name,s.id from ht_svr_sys_role t left join ht_svr_sys_menu r on substr(t.f_right,r.f_id,1) = '1' left join ht_svr_user s on s.role = t.f_id where r.f_id = '" + this.RightId + "' union select q.name,q.id from ht_svr_sys_role t left join ht_svr_sys_menu r on substr(t.f_right,r.f_id,1) = '1' left join ht_svr_org_group s on s.f_role = t.f_id left join ht_svr_user q on q.levelgroupid = s.f_code where r.f_id = '" + this.RightId + "' order by id desc", "Name", "ID"); } }
protected void initView() { txtBtime.Text = System.DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd"); txtEtime.Text = System.DateTime.Now.AddDays(1).ToString("yyyy-MM-dd"); MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); opt.bindDropDownList(listProd, "select distinct t.prod_code,r.prod_name from ht_prod_report t left join ht_pub_prod_design r on r.prod_code = t.prod_code where r.is_valid = '1' and r.is_del = '0' and substr(t.starttime,1,10) between '" + txtBtime.Text + "' and '" + txtEtime.Text + "' or substr(t.endtime,1,7) between '" + txtBtime.Text + "' and '" + txtEtime.Text + "' or (t.starttime > '" + txtBtime.Text + "' and t.endtime < '" + txtEtime.Text + "') and t.prod_code is not null and r.prod_name is not null", "prod_name", "prod_code"); opt.bindDropDownList(listSection, "select section_code,section_name from ht_pub_tech_section where is_valid = '1' and is_del = '0' order by section_code", "section_name", "section_code"); opt.bindDropDownList(listPoint, "select para_code,para_name from ht_pub_tech_para t where para_type like '___1%' and is_del = '0'", "para_name", "para_code"); opt.bindDropDownList(listBatch, "select distinct plan_id from ht_qlt_data_record t where b_time between '" + txtBtime.Text + "' and '" + txtEtime.Text + "'", "plan_id", "plan_id"); bindgrid(); }
protected void Page_Load(object sender, EventArgs e) { base.PageLoad(sender, e); if (!IsPostBack) { tvHtml = InitTree(); MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); opt.bindDropDownList(listSection_2, "select section_code,section_name from ht_pub_tech_section where is_del = '0' and is_valid = '1' order by section_code", "section_name", "section_code"); opt.bindDropDownList(listSection, "select section_code,section_name from ht_pub_tech_section where is_valid = '1' and is_del = '0' order by section_code", "section_name", "section_code"); opt.bindDropDownList(listApt, "select F_CODE,F_NAME from ht_svr_org_group order by f_code ", "F_NAME", "F_CODE"); } }
protected void Page_Load(object sender, EventArgs e) { base.PageLoad(sender, e); if (!IsPostBack) { bindGrid1(); bindGrid2(); bindGrid3(); MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); opt.bindDropDownList(listPathAll, "select distinct pathname,pathcode from ht_pub_path_prod t where t.is_del = '0' order by pathname", "pathname", "pathcode"); opt.bindDropDownList(listSection, "select distinct r.section_code ,r.section_name from ht_pub_tech_section r left join ht_pub_tech_para s on substr(s.para_code,1,5) = r.section_code and s.is_del = '0' and s.is_valid = '1' where r.is_del = '0' and r.is_valid = '1' and s.para_type like '______1%' order by r.section_code", "section_name", "section_code"); } }
protected void Page_Load(object sender, EventArgs e) { base.PageLoad(sender, e); if (!IsPostBack) { MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator(); opt.bindDropDownList(listEditor, "select ID,Name from ht_SVR_USER where is_del = '0' order by id", "NAME", "ID"); opt.bindDropDownList(listEditor2, "select ID,Name from ht_SVR_USER where is_del = '0' order by id", "NAME", "ID"); txtMonth.Text = System.DateTime.Now.ToString("yyyy-MM"); bindGrid1(); } bindGrid2(hideID.Value); }