protected void btnNewAdd_Click(object sender, EventArgs e) { try { ML_Common.SetDropDownValue(ddlCokeType, -1); ML_Common.SetDropDownValue(ddlCokeSupplier, -1); ML_Common.SetDropDownValue(ddlAnalysisType, -1); txtFieldSize.Text = string.Empty; txtFieldUnit.Text = string.Empty; txtFieldSpec.Text = string.Empty; txtMinValue.Text = string.Empty; txtMaxValue.Text = string.Empty; ViewState["dtCokeDynamic"] = null; dtCokeDynamic = new DataTable(); dtCokeDynamic = BindCokeDynamicDataTable(); dtCokeDynamic.Rows.Add(dtCokeDynamic.NewRow()); grdCokeDynamic.DataSource = dtCokeDynamic; grdCokeDynamic.DataBind(); //int TotalColumns = grdCokeComposite.Rows[0].Cells.Count; //grdCokeComposite.Rows[0].Cells.Clear(); //grdCokeComposite.Rows[0].Cells.Add(new TableCell()); //grdCokeComposite.Rows[0].Cells[0].ColumnSpan = TotalColumns; //grdCokeComposite.Rows[0].Cells[0].Text = "No Record Found"; btnSubmit.Visible = false; btnNewAdd.Visible = false; UpdatePanelSave.Update(); UpdatePanelGrid.Update(); } catch (Exception ex) { Exception exc = ex;// LogManager.LogManager.WriteErrorLog(ex); } }
public void FormFieldsClear() { try { lblMsg.Text = string.Empty; ML_Common.SetDropDownValue(ddlUserType, -1); txtUserName.Text = string.Empty; txtFirstName.Text = string.Empty; txtLastName.Text = string.Empty; txtEmail.Text = string.Empty; txtTelephone.Text = string.Empty; txtMobile.Text = string.Empty; txtPassword.Text = string.Empty; txtRePassword.Text = string.Empty; } catch (Exception ex) { Exception exx = ex; } }