protected void grdUserName_SelectedIndexChanging(object sender, GridViewSelectEventArgs e) { try { lblMsg.Text = string.Empty; lblMsg.Visible = false; int lngId = ML_Common.string2int32(grdUserName.DataKeys[e.NewSelectedIndex].Values[0].ToString()); ViewState["UserNameViewId"] = lngId; if (lngId > 0) { // e.Cancel = true; FormFieldsClear(); FillObjectToForm(lngId, false); UpdatePanelView.Update(); ModalPopupExtenderView.Show(); } else { lblMsg.Visible = true; lblMsg.Text = "Record is not exists?"; } } catch (Exception ex) { Exception exx = ex; } }
protected void grdCokeSupplier_SelectedIndexChanging(object sender, GridViewSelectEventArgs e) { try { lblMsg.Text = string.Empty; lblMsg.Visible = false; int lngId = ML_Common.string2int32(grdCokeSupplier.DataKeys[e.NewSelectedIndex].Values[0].ToString()); ViewState["grdCokeSupplierId"] = lngId; if (lngId > 0) { FormFieldsClear(); FillObjectToForm(lngId, false); UpdatePanelView.Update(); ModalPopupExtenderView.Show(); } else { lblMsg.Text = "Record is not exists?"; lblMsg.Visible = true; } } catch (Exception ex) { Exception exc = ex;// LogManager.LogManager.WriteErrorLog(ex); } }