protected void Clear() { txtaddrs.Text = ""; txtbthchno.Text = ""; txtcodesample.Text = ""; txtdllcno.Text = ""; txtdmipagency.Text = ""; txtdtmn.Text = ""; txtdtsam.Text = ""; txtfirnmdlr.Text = ""; txthsno.Text = ""; txtlcstr.Text = ""; txtmnname.Text = ""; txtnmowner.Text = ""; txtstockl.Text = ""; txtvldty.Text = ""; txtvldty.Text = ""; ddlClass.ClearSelection(); ddldist.ClearSelection(); ddlsample.ClearSelection(); ddlsampleType.ClearSelection(); ddlstate.ClearSelection(); Rblphnma.ClearSelection(); RblSmpleDrawnFrom.ClearSelection(); }
public bool Validatesave() { if (ddlClass.SelectedIndex == 0) { cf.ShowAlertMessage("Select Sample Class"); ddlClass.Focus(); return(false); } if (txtcodesample.Text == "") { cf.ShowAlertMessage("Enter Code No. of Sample"); txtcodesample.Focus(); return(false); } if (txtcodesample.Text != "") { bool val; val = obj.CheckInput_new(txtcodesample.Text); if (val == true) { Response.Redirect("~/Error.aspx"); } } if (txtfirnmdlr.Text == "") { cf.ShowAlertMessage("Enter Name of the Firm/Dealer"); txtfirnmdlr.Focus(); return(false); } if (txtfirnmdlr.Text != "") { bool val; val = obj.CheckInput_new(txtcodesample.Text); if (val == true) { Response.Redirect("~/Error.aspx"); } } if (txtnmowner.Text == "") { cf.ShowAlertMessage("Enter Name of the Owner"); txtnmowner.Focus(); return(false); } if (txtnmowner.Text != "") { bool val; val = obj.CheckInput_new(txtnmowner.Text); if (val == true) { Response.Redirect("~/Error.aspx"); } } if (txtdllcno.Text == "") { cf.ShowAlertMessage("Enter Licence No"); txtdllcno.Focus(); return(false); } if (txtdllcno.Text != "") { bool val; val = obj.CheckInput_new(txtdllcno.Text); if (val == true) { Response.Redirect("~/Error.aspx"); } } //if (txtvldty.Text.Trim() != "") //{ // bool val; // val = obj.CheckInput_new(txtvldty.Text); // if (val == true) // Response.Redirect("~/Error.aspx"); // if (!objValidate.IsDate(txtvldty.Text.Trim())) // { // cf.ShowAlertMessage("Enter Valid Date"); // txtvldty.Focus(); // return false; // } //} if (txtbthchno.Text == "") { cf.ShowAlertMessage("Please Enter Batch No"); txtbthchno.Focus(); return(false); } if (txtbthchno.Text != "") { bool val; val = obj.CheckInput_new(txtbthchno.Text); if (val == true) { Response.Redirect("~/Error.aspx"); } } if (txtdtmn.Text.Trim() != "") { bool val; val = obj.CheckInput_new(txtdtmn.Text); if (val == true) { Response.Redirect("~/Error.aspx"); } if (!objValidate.IsDate(txtdtmn.Text.Trim())) { cf.ShowAlertMessage("Enter Date of Manufacturing"); txtdtmn.Focus(); return(false); } } if (txtstockl.Text == "") { cf.ShowAlertMessage("Please Enter Stock position of the Lot"); txtstockl.Focus(); return(false); } if (txtstockl.Text != "") { bool val; val = obj.CheckInput_new(txtstockl.Text); if (val == true) { Response.Redirect("~/Error.aspx"); } } if (txtdmipagency.Text == "") { cf.ShowAlertMessage("Date of Receipt of the stock by the dealer/manufacture/importer/pool handling agency"); txtdmipagency.Focus(); return(false); } if (txtdmipagency.Text != "") { bool val; val = obj.CheckInput_new(txtdmipagency.Text); if (val == true) { Response.Redirect("~/Error.aspx"); } } if (ddlstate.SelectedIndex == 0) { cf.ShowAlertMessage("Select State Name"); ddlstate.Focus(); return(false); } if (ddldist.SelectedIndex == 0) { cf.ShowAlertMessage("Select District Name"); ddldist.Focus(); return(false); } if (txthsno.Text == "") { cf.ShowAlertMessage("Please Enter House No. Flat No"); txthsno.Focus(); return(false); } if (txthsno.Text != "") { bool val; val = obj.CheckInput_new(txthsno.Text); if (val == true) { Response.Redirect("~/Error.aspx"); } } if (txtlcstr.Text == "") { cf.ShowAlertMessage("Please Enter Locality/Street Name"); txtlcstr.Focus(); return(false); } if (txtlcstr.Text != "") { bool val; val = obj.CheckInput_new(txtlcstr.Text); if (val == true) { Response.Redirect("~/Error.aspx"); } } //if (txtdtsam.Text.Trim() != "") //{ // bool val; // val = obj.CheckInput_new(txtdtsam.Text); // if (val == true) // Response.Redirect("~/Error.aspx"); // if (!objValidate.IsDate(txtdtsam.Text.Trim())) // { // cf.ShowAlertMessage("Enter Valid Date"); // txtdtsam.Focus(); // return false; // } //} if (ddlsampleType.SelectedIndex == 0) { cf.ShowAlertMessage("Select Sample type"); ddlsampleType.Focus(); return(false); } if (ddlsample.SelectedIndex == 0) { cf.ShowAlertMessage("Select Sample Name"); ddlsample.Focus(); return(false); } if (txtmnname.Text == "") { cf.ShowAlertMessage("Please Enter Locality/Street Name"); txtmnname.Focus(); return(false); } if (txtmnname.Text != "") { bool val; val = obj.CheckInput_new(txtmnname.Text); if (val == true) { Response.Redirect("~/Error.aspx"); } } if (txtaddrs.Text == "") { cf.ShowAlertMessage("Please Enter Manufacturer Address"); txtaddrs.Focus(); return(false); } if (txtaddrs.Text != "") { bool val; val = obj.CheckInput_new(txtaddrs.Text); if (val == true) { Response.Redirect("~/Error.aspx"); } } if (RblSmpleDrawnFrom.SelectedIndex == -1) { cf.ShowAlertMessage("Select from Which Bag Samples is drwan "); RblSmpleDrawnFrom.Focus(); return(false); } if (Rblphnma.SelectedIndex == -1) { cf.ShowAlertMessage("Select whether Panchanama Conducted"); ddlsample.Focus(); return(false); } if (ddlmnstate.SelectedIndex == 0) { cf.ShowAlertMessage("Select Manufacturer State"); ddlmnstate.Focus(); return(false); } return(true); }