protected void btnValidateInfo_OnClick(object sender, EventArgs e) { try { var tobevalidated = Session["edit_id"].ToString(); //KCDFAlert.ShowAlert(tobevalidated);var prj = ddlAccountType.SelectedItem.Text; var usNM = Session["username"].ToString(); var credentials = new NetworkCredential(ConfigurationManager.AppSettings["W_USER"], ConfigurationManager.AppSettings["W_PWD"], ConfigurationManager.AppSettings["DOMAIN"]); Portals sup = new Portals(); sup.Credentials = credentials; sup.PreAuthenticate = true; bool myValid = sup.FnValidateSubmission(usNM, tobevalidated); switch (myValid) { case true: txtValidate.Text = "ALL UPLOADS AVAILABLE"; txtValidate.ForeColor = Color.GhostWhite; txtValidate.BackColor = Color.ForestGreen; // btnFinalSubmit.Enabled = true; btnValidateInfo.Enabled = false; hdnTxtValidit.Value = "isValid"; KCDFAlert.ShowAlert("All Uploads available, you can submit your application: " + hdnTxtValidit.Value); break; case false: txtValidate.Text = "PLEASE COMPLETE THE APPLICATION FIRST"; txtValidate.BackColor = Color.Red; txtValidate.ForeColor = Color.GhostWhite; // btnFinalSubmit.Enabled = false; hdnTxtValidit.Value = "isInValid"; sup.FnChangeSubmitStatus(tobevalidated, usNM); KCDFAlert.ShowAlert("No uploads yet!, you cannot submit anything: " + hdnTxtValidit.Value); break; } } catch (Exception ex) { KCDFAlert.ShowAlert(ex.Message); txtValidate.Text = "PLEASE UPLOAD ALL DOCUMENTS"; txtValidate.BackColor = Color.Red; txtValidate.ForeColor = Color.GhostWhite; //btnFinalSubmit.Enabled = false; } }