protected void rblMe_PreRender(object sender, EventArgs e) { if (Session["MyForms"] != null) { rblMe.SelectedValue = Session["MyForms"].ToString(); BindSummary(); UpdatePanel1.Update(); } else { rblMe.SelectedIndex = 0; BindSummary(); UpdatePanel1.Update(); } }
protected void CheckBox1_CheckedChanged(object sender, EventArgs e) { if (CheckBox1.Checked == true) { TextBox1.ReadOnly = false; RequiredFieldValidator7.Enabled = true; } else { TextBox1.ReadOnly = true; TextBox1.Text = ""; RequiredFieldValidator7.Enabled = false; } UpdatePanel1.Update(); }
private void cargarIBCategoria() { int _ddl = int.Parse(ddlCategorias.SelectedValue.ToString()); DataSet _cant = _consulta.Com21_consulta_Resportes(2, _ddl, "0", "0"); if (_cant.Tables[0].Rows.Count > 0) { GvRProductos.DataSource = _cant.Tables[0]; GvRProductos.DataBind(); } else { ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.GetType(), "click", "alert('No exiten registro para la categoria: " + ddlCategorias.SelectedItem + "" + "');", true); } }
void SaveRegion(bool isNEW) { ModelLocation ml = new ModelLocation(); ml.ID = isNEW ? Guid.NewGuid() : new Guid(cboRegion.SelectedValue); ml.Description = txtAddRegion.Text.Trim(); ml.RegionID = ml.ID; ml.ZoneID = null; ml.WoredaID = null; ml.Save(); Messages.SetMessage("Location successfully updated!", WarehouseApplication.Messages.MessageType.Success); UpdatePanel1.Update(); FillRegion(cboRegion); txtAddRegion.Text = string.Empty; }
protected void New_model_Click(object sender, EventArgs e) { Clear(); Panel_Spare.Visible = false; Panel_NewSpare.Visible = false; UpdatePanel_NewSpare.Update(); Panel_NewModel.Visible = true; UpdatePanel_NewModel.Visible = true; TextBox1.Text = Label_enname.Text; UpdatePanel_NewModel.Update(); Panel1.Visible = false; UpdatePanel1.Update(); Grid_EquipModel.EditIndex = -1; BindGrid_EquipModel("and EN_ID ='" + new Guid(Label_enid.Text.ToString()) + "'"); }
protected void tablaComputadoras_SelectedIndexChanging(object sender, GridViewSelectEventArgs e) { Label id_pc = (Label)tablaComputadoras.Rows[e.NewSelectedIndex].FindControl("Label1"); computadora pc = ent.computadora.Find(Convert.ToInt32(id_pc.Text)); lbNombreComputadora.Text = id_pc.Text; txtNombre.Text = pc.nombre; txtMarca.Text = pc.Marca; txtModelo.Text = pc.Modelo; txtOS.Text = pc.SO; cbLaboratorio.SelectedValue = pc.id_laboratorio.ToString(); txtMac.Text = pc.Mac; txtIP.Text = pc.ip; txtDes.Text = pc.descripcion; UpdatePanel1.Update(); UpdatePanel2.Update(); btEditComputadora.Visible = true; btAddComputadora1.Visible = false; modalPupoAgregarDom.Show(); }
//关闭进度表 protected void ButtonPClose(object sender, EventArgs e) { Panel2.Visible = false; UpdatePanel2.Update(); Panel_Postpone.Visible = false; UpdatePanel_Postpone.Update(); Panel_Pschedule.Visible = false; UpdatePanel_Pschedule.Update(); Panel3.Visible = false; UpdatePanel3.Update(); Panel_WorkOrder.Visible = false; UpdatePanel_WorkOrder.Update(); Panel1.Visible = false; UpdatePanel1.Update(); }
protected void Clear_model_Click(object sender, EventArgs e) { Grid_EquipModel.EditIndex = -1; Panel_NewName.Visible = false; UpdatePanel_NewName.Update(); Panel_NewModel.Visible = false; UpdatePanel_NewModel.Update(); Panel_Spare.Visible = false; Panel_NewSpare.Visible = false; UpdatePanel_NewSpare.Update(); Txtmodel.Text = ""; BindGrid_EquipModel("and EN_ID ='" + new Guid(Label_enid.Text.ToString()) + "'"); Panel1.Visible = false; UpdatePanel1.Update(); }
protected void CbPlanta_SelectedIndexChanged(object sender, EventArgs e) { if (IsCallback) { return; } if (Usuario == null) { Response.Redirect("~/"); } UpdatePanel1.Update(); SelectedLineas = IdLinea; }
protected void btnMultiWareHouse_Click(object sender, EventArgs e) { DAL.JuicDao dao = new DAL.JuicDao(hfDbName.Value); try { string[] venders = dao.GetAllJWareHouses().AsEnumerable().Select(row => Convert.ToString(row["JWareHouse"])).ToArray(); (this.Parent.FindControl("ModalPanelChild").FindControl("ListPicker") as ListPicker).SetColumn("倉庫別", "txtJWareHouse"); (this.Parent.FindControl("ModalPanelChild").FindControl("ListPicker") as ListPicker).InitItems(venders); UpdatePanel1.ShowControl(this.Parent.FindControl("ModalPanelChild").ClientID, "倉庫別多筆選擇"); } finally { dao = null; } }
protected void GvLookupPegawai_SelectedIndexChanged(object sender, EventArgs e) { if (Session["Triger"] != null) { if (Session["Triger"].ToString() == "txtFilterItem0") { this.txtFilterItem0.Text = ((Label)GvLookupPegawai.SelectedRow.Cells[0].FindControl("Label1")).Text; } Session.Remove("Triger"); } setInitialLookupState(); UpdatePanel1.Update(); }
protected void ddlCompName_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e) { if (allowdToAddOrg(int.Parse(ddlCompName.SelectedValue))) { int licenceAvail = getAvailLicence(int.Parse(ddlCompName.SelectedValue)); lblCarrierlicense.Text = "Avalable license: " + licenceAvail; Session["Licence"] = licenceAvail; txtCarrierLimit.Text = "" + licenceAvail; } else { string Msg = "Sorry!! Organisation Limit Reached for this company."; System.Web.UI.ScriptManager.RegisterClientScriptBlock(UpdatePanel1, UpdatePanel1.GetType(), "showAlert", "showAlert('" + Msg + "');", true); } }
//重置按钮 protected void BtnReset_Click(object sender, EventArgs e) { Senior_DetailOPEN.Visible = true; Senior_DetailCLOSE.Visible = false; Panel_Grid.Visible = true; UpdatePanel_Grid.Update(); Panel1.Visible = false; UpdatePanel1.Update(); Panel_Name.Visible = false; UpdatePanel_Name.Update(); textname.Text = ""; UpdatePanel_Grid.Update(); panelGraph.Visible = false; UpdatepanelGraph.Update(); }
private bool SaveReply(QA_AnswerMod m_answer) { try { QA_AnswerBll.GetInstance().AddAnswer(m_answer); RefreshSession(); ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.GetType(), "addanswer", "alert('回答发布成功!');", true); return(true); } catch { ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.GetType(), "addanswer", "alert('系统故障,发布失败!');", true); return(false); } }
protected void ddlGodown_SelectedIndexChanged(object sender, EventArgs e) { try { //lblrackerror.Text = string.Empty; int g_id = Convert.ToInt32(ddlGodown.SelectedValue); ddlrackbind(g_id); UpdatePanel1.Update(); } catch (Exception ex) { ErrorLog.saveerror(ex); //Do Logging } }
//检索 protected void Button1_Sh(object sender, EventArgs e) { string condition = GetCondition(); BindGridview1(condition); UpdatePanel_OutWeb.Update(); Panel_SampleNew.Visible = false; UpdatePanel_SampleNew.Update(); Panel_Supply.Visible = false; UpdatePanel_Supply.Update(); Panel_NewProgram.Visible = false; UpdatePanel_NewProgram.Update(); Panel1.Visible = false; UpdatePanel1.Update(); }
protected void Btn_Search_Click(object sender, EventArgs e) { GridView_CS.EditIndex = -1; databind1(); Panel_Add.Visible = false; UpdatePanel_Add.Update(); Panel_PT.Visible = false; UpdatePanel_PT.Update(); Panel_Product.Visible = false; UpdatePanel_Product.Update(); Panel_Basic.Visible = false; UpdatePanel_Basic.Update(); Panel1.Visible = false; UpdatePanel1.Update(); }
protected void dN_TextChange(object sender, EventArgs e) { // ClientScript.RegisterClientScriptBlock(this.GetType(), "Alert", "alert('Selected')", true); GridViewRow gvrow = (GridViewRow)((DropDownList)sender).NamingContainer; DropDownList dd = (DropDownList)gvrow.FindControl("n"); DropDownList ds = (DropDownList)gvrow.FindControl("SN"); Label al = (Label)gvrow.FindControl("AL"); Label cr = (Label)gvrow.FindControl("Credit"); al.Text = "0"; cr.Text = "0"; int temp_flag = 0; int skip_one = 0; String course_code = ""; String Course_title = ""; String temp = dd.Text; for (int j = 0; j < temp.Length; j++) { if (temp[j].Equals(':')) { temp_flag = 1; } if (temp_flag == 0) { course_code += temp[j]; } else { if (skip_one == 1) { Course_title += temp[j]; } skip_one = 1; } } ArrayList sn = new DatabaseConnectionManager().Get_Query("SELECT DISTINCT Section_Number FROM load_table where Course_Code='" + course_code + "' AND uid=''", 2); ds.DataSource = sn; ds.Text = "Select"; ds.DataBind(); //ClientScript.RegisterClientScriptBlock(this.GetType(), "Alert", "alert('"+Course_title+"')", true); ScriptManager.RegisterClientScriptBlock(UpdatePanel1, UpdatePanel1.GetType(), "", "Close_add_pop();", true); }
protected void btnLink_Click(object sender, EventArgs e) { try { string empid = ((LinkButton)(sender)).CommandArgument; UserLoginDetails _objuserlog = new UserLoginDetails(); _objuserlog.EmpID = Convert.ToInt32(empid.ToString()); string Isblock = ((LinkButton)(sender)).Text.ToLower(); if (Isblock == "block") { _objuserlog.IsBlocked = true; _objuserlog.Update_UserLog(); _objuserlog.Update_UserLog(); BindDataEmployeeDetails(); loder("succcessfully block", "4000"); } else if (Isblock == "unblock") { _objuserlog.IsBlocked = false; _objuserlog.Update_UserLog(); _objuserlog.Update_UserLog(); BindDataEmployeeDetails(); loder("succcessfully unblock", "4000"); } else { lblEID.Text = empid; ddlRolepop.DataSource = Roles(); ddlRolepop.DataBind(); ddlRolepop.Attributes.Add("style", "display:block;"); selrol.Visible = true; ddlRolepop.Items.Insert(0, new ListItem("None", "0")); txtPassword.Focus(); txtPassword.Text = ""; txtPassword.Attributes.Add("value", ""); txtPassword.Text = ((Label)((System.Web.UI.WebControls.WebControl)(sender)).Parent.FindControl("lblEName")).Text; UpdatePanel1.Update(); ModalPopUpExMSG.Show(); } } catch (Exception ex) { } }
protected void btnImprimirCliente_Click1(object sender, EventArgs e) { DsAgencias dsa = new DsAgencias(); IAgencia ag = AgenciaFactory.GetAgencia(); ag.AgenciaID = AgenciaConectadaID; dsa = ag.GetAgenciasConsultaDataSet(); string filtro = "AgenciaID =" + AgenciaConectadaID + ""; DsAgencias.DatosRow[] drLista = (DsAgencias.DatosRow[])dsa.Datos.Select(filtro); DsGuiaFacturaImpresion dsFactura = (DsGuiaFacturaImpresion)Session["DatosGuia"]; //DsEmisionMasiva.DatosDataTable ds = (DsEmisionMasiva.DatosDataTable)Session["dsEmisionMasiva"]; string pagina = ObtienePaginaImpresion(drLista[0].TipoImpresionGuiaId); if (dsFactura.Datos.Count() > 0) { string script = ""; System.Web.HttpBrowserCapabilities browser = Request.Browser; string name = browser.Browser; float version = (float)(browser.MajorVersion + browser.MinorVersion); if ((name == "IE" && (version == 8))) { // script += "window.showModalDialog('" + pagina + "','Imprimiendo Factura...','Height: 934px;Width: 762px;edge: Raised; center: No; Status:No; help: No; resizable: No;');\n"; // script += " window.showModalDialog('"+pagina+"','','dialogHeight: 934px;dialogWidth: 762px;edge: Raised; center: No; Status:No; help: No; resizable: No;');"; script += " window.open('"+ pagina + "','','Height: 934px;Width: 762px;edge: Raised; center: No; Status:No; help: No; resizable: No;');"; ScriptManager.RegisterClientScriptBlock(this.UpdatePanel1, UpdatePanel1.GetType(), "scriptOpen", script, true); } else { // script += "window.open('" + pagina + "','Imprimiendo Factura...','left=400, top=100, height=500, width= 800, status=no, resizable=no, scrollbars=no, toolbar=yes,location= no, menubar=yes')"; script += " window.open('"+ pagina + "','','Height: 934px;Width: 762px;edge: Raised; center: No; Status:No; help: No; resizable: No;');"; ScriptManager.RegisterClientScriptBlock(this.UpdatePanel1, UpdatePanel1.GetType(), "scriptOpen", script, true); } } }
//Grid_EquipName相关 protected void Grid_EquipName_RowCommand(object sender, GridViewCommandEventArgs e) { GridView1.EditIndex = -1; GridView1.SelectedIndex = -1; if (e.CommandName == "Choose_Item")//选择 { GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow; Grid_EquipName.SelectedIndex = row.RowIndex; Guid EN_ID = new Guid(Convert.ToString(e.CommandArgument)); sd.Update_EquipmentName_Output(EN_ID, 1, 572); BindGridView1(" and EN_Output is not null and EN_WorkTime is not null and EN_Output!=-1 and EN_WorkTime!=-1"); UpdatePanel1.Update(); BindGrid_EquipName(" and (EN_Output is null or EN_Output=-1) and (EN_WorkTime is null or EN_WorkTime=-1)"); UpdatePanel_Name.Update(); } }
protected void Button1_Click(object sender, EventArgs e) { try { int agencia = Convert.ToInt32(Session["idagencia"]); GridView1.DataSource = ver.NegraFincliente(TextBox1.Text, agencia); GridView1.Columns[4].Visible = false; GridView1.DataBind(); } catch (Exception ex) { string notificacion2; notificacion2 = "myFunction2();"; ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.GetType(), "notificacion2", notificacion2, true); } }
/// <summary> /// 显示新消息 /// </summary> protected void ShowNewMessageCount() { int count = MessageManager.GetNewMailInfo((Session["Login"] as User)); HtmlImage img = UpdatePanel1.FindControl("imgNewMessage") as HtmlImage; if (count > 0) { img.Visible = true; lblMessageCount.Text = count.ToString(); } else { img.Visible = false; lblMessageCount.Text = "0"; } }
protected void btnRemoveRegion_Click(object sender, EventArgs e) { DataTable dt = ModelLocation.GetZone(new Guid(cboRegion.SelectedValue)); if (dt.Rows.Count > 0) { Messages.SetMessage("The Region contains " + dt.Rows.Count + " zone under it. Removing Region having one or more zone is not allowed!" , WarehouseApplication.Messages.MessageType.Error); UpdatePanel1.Update(); return; } ModelLocation.DeleteLocation(new Guid(cboRegion.SelectedValue)); FillRegion(cboRegion); }
protected void btnCloseMode_Click(object sender, EventArgs e) { try { ddlproductbind(); ddlVendorbind(); ddlbatchbind(); ScriptManager.RegisterStartupScript(this, GetType(), "Close Modal Popup", "Closepopup();", true); UpdatePanel1.Update(); } catch (Exception ex) { ErrorLog.saveerror(ex); //Do Logging } }
protected void ddlEstados2_SelectedIndexChanged(object sender, EventArgs e) { GridViewRow gvr = (GridViewRow)((DropDownList)sender).Parent.Parent; DropDownList ddlEstados2 = (DropDownList)sender; string rowNumber = gvPersonalizado.DataKeys[gvr.RowIndex].Value.ToString(); objDtoMolduraxUsuario.PK_IMU_Cod = int.Parse(rowNumber); objDtoMolduraxUsuario.FK_IMXUE_Cod = int.Parse(ddlEstados2.SelectedValue); objCtrMolduraxUsuario.actualizarMXUxCod(objDtoMolduraxUsuario); string sol = lblid.Text; CargarMolduras(sol); gvPedidos.DataSource = objCtrSolicitud.ListarSolicitudesTrabajdor(); gvPedidos.DataBind(); UpdatePanel1.Update(); }
protected void Button_AddBasic_Click(object sender, EventArgs e) { TextBox1.Text = ""; TextBox2.Text = ""; TxtFormulaEdit.Text = ""; LabelAddOrEdit.Text = "新增"; DropDownList_PBC.DataSource = csl.S_PBCraft_Capacity(new Guid(label_CSN_ID3.Text.Trim())); DropDownList_PBC.DataTextField = "PBC_Name"; DropDownList_PBC.DataValueField = "PBC_ID"; DropDownList_PBC.DataBind(); DropDownList_PBC.SelectedIndex = 0; label_CSN_Name_ADD.Text = label_CSN_Name3.Text; DropDownList_PBC.Enabled = true; Panel1.Visible = true; UpdatePanel1.Update(); }
protected void Button_Cancel_Click(object sender, EventArgs e) { GridView_CS.EditIndex = -1; TextBox_CS_Search.Text = ""; databind1(); Panel_Add.Visible = false; UpdatePanel_Add.Update(); Panel_PT.Visible = false; UpdatePanel_PT.Update(); Panel_Product.Visible = false; UpdatePanel_Product.Update(); Panel_Basic.Visible = false; UpdatePanel_Basic.Update(); Panel1.Visible = false; UpdatePanel1.Update(); }
protected void modify_RowDeleting(object sender, GridViewDeleteEventArgs e) { GridViewRow r = modify.Rows[e.RowIndex]; Label HC = (Label)r.FindControl("hash_code"); Label AL = (Label)r.FindControl("AL"); Label CR = (Label)r.FindControl("Credit"); Label UID = (Label)r.FindControl("M_Uid"); new DatabaseConnectionManager().Modify_Delete(HC.Text, UID.Text, AL.Text, CR.Text); //ClientScript.RegisterClientScriptBlock(this.GetType(), "Alert", "alert('"+HC.Text+"-"+AL.Text+"="+CR.Text+"-"+UID.Text+"')", true); new DatabaseConnectionManager().Check_Load_By_Uid(query, PlaceHolder1, this); modify.EditIndex = -1; modify.DataBind(); ScriptManager.RegisterClientScriptBlock(UpdatePanel1, UpdatePanel1.GetType(), "", "Close_add_pop();", true); //banner_update(); }
protected void Page_Load(object sender, EventArgs e) { try { if (Page.IsPostBack == false) { gvEvent.PageSize = 10; bindDataGrid(); } } catch (Exception ex) { UNOException.UNO_DBErrorLog(ex.Message, ex.StackTrace, "EventBrowser"); } ScriptManager.RegisterClientScriptBlock(UpdatePanel1, UpdatePanel1.GetType(), "Script", "HightlightMyTable();", true); }