protected void btnSave_Click(object sender, EventArgs e) { if (Page.IsValid) { string PTP_MOBILE = ""; try { if (TXTID.Value == "0") { Hashtable vHashtable = new Hashtable(); vHashtable.Add("CUST_ID", TXTID.Value); vHashtable.Add("CUST_VSOHQ_ID", "0"); vHashtable.Add("CUST_STA_ID", ddl_state.SelectedValue); vHashtable.Add("CUST_NAME", CUST_NAME_TXT.Text); vHashtable.Add("CUST_PROSPECTIVE", ddlProspective.SelectedItem.Text); vHashtable.Add("CUST_PREFIX", CUST_PREFIX_NAME.SelectedItem.Text); vHashtable.Add("CUST_ADDRESS", CUST_ADD_TXT.Text); vHashtable.Add("CUST_COMP_NAME", CUST_COMP_NAME_TXT.Text); vHashtable.Add("CUST_DISTRICT", "0"); vHashtable.Add("CUST_VILLAGE_TWN_CITY", txt_vil.Text); vHashtable.Add("CUST_POST_OFFICE", txt_post.Text); vHashtable.Add("CUST_STATE", "0"); vHashtable.Add("CUST_CATRGORY_ID", CUST_CATRGORY_DDL.SelectedValue); vHashtable.Add("CUST_CONSULT_NAME", CUST_CONSL_TXT.Text); vHashtable.Add("CUST_CONSULT_MOB", CUST_CONSL_MOB_TXT.Text); vHashtable.Add("CUST_PIN", CUST_PIN_TXT.Text); vHashtable.Add("CUST_PHONE", CUST_PH_TXT.Text); vHashtable.Add("CUST_EMAIL", CUST_EMAIL_TXT.Text); vHashtable.Add("CUST_MOBILE", CUST_MOBILE_TXT.Text); vHashtable.Add("CUST_DEALER", vATSession.CUST_ID); vHashtable.Add("CUST_DESIGNATION", TXT_DESIGNATION.Text); vHashtable.Add("CUST_COUNTRY_ID", CUST_COUNTRY_DDL.SelectedValue); vHashtable.Add("CUST_ARHQ_ID", CUST_STATION_DDL.SelectedValue); vHashtable.Add("CUST_ORGANIZATION_NAME", ORGANIZATION_DDL.SelectedItem.Text); vHashtable.Add("CUST_FROM_DATE", TXT_START.Text); vHashtable.Add("CUST_TO_DATE", TXT_END.Text); if (DBManager.ExecInsUpsReturn(vHashtable, "INS_CUSTOMER_NEW", (ATSession)Session["User"])) { if (TXTID.Value.Equals("0")) { try { string pwd = Create_Password(); Hashtable vHT = new Hashtable(); vHT.Add("ID", TXTID.Value); if (TXTID.Value == "0") { vHT.Add("USR_LOGIN", CUST_MOBILE_TXT.Text); } else { vHT.Add("USR_LOGIN", CUST_MOBILE_TXT.Text.Trim()); } vHT.Add("USR_COMPANY", CUST_COMP_NAME_TXT.Text); vHT.Add("USR_ZONE_ID", CUST_COUNTRY_DDL.SelectedValue); vHT.Add("USR_REGHQ_ID", ddl_state.SelectedValue); vHT.Add("USR_ARHQ_ID", CUST_STATION_DDL.SelectedValue); vHT.Add("USR_VSOHQ_ID", "0"); vHT.Add("USR_CONT_NAME", CUST_NAME_TXT.Text); vHT.Add("USR_ADDRESS", ""); vHT.Add("USR_TYPE", "Doctor"); vHT.Add("USR_PIN", ""); vHT.Add("USR_PHONE", CUST_PH_TXT.Text); vHT.Add("USR_MOBILE", CUST_MOBILE_TXT.Text); vHT.Add("USR_FAX", ""); vHT.Add("USR_EMAIL", CUST_EMAIL_TXT.Text); vHT.Add("USR_PASSWORD", pwd); vHT.Add("USR_COUNTRY", CUST_COUNTRY_DDL.SelectedValue); vHT.Add("USR_ORGANIZATION_NAME", ORGANIZATION_DDL.Text); DBManager.ExecInsUps(vHT, "INS_USER", (ATSession)Session["User"]); ATApp vATApp = (ATApp)Application["Config"]; String vBody = "Dear " + CUST_NAME_TXT.Text + "\n\nLogin Detaials for Nerdnerdy Intranet Application.\n\n"; vBody += "URL is: www.nerdnerdy.in\n"; if (TXTID.Value == "0") { vBody += "Login: "******"\nPassword:"******"\n\n"; } else { vBody += "Login: "******"\nPassword:"******"\n\n"; } vBody += "For any query, please revert us back.\n\nThanks and Regards\n"; ATCommon.SendMail(CUST_MOBILE_TXT.Text, "Login Detaials for Nerdnerdy Intranet Application.", vBody, vATApp); ShowMsg(int.Parse(TXTID.Value)); Clear(); } catch (Exception xe) { ShowMsg(xe); } } else { Hashtable vHT1 = new Hashtable(); vHT1.Add("USR_LOGIN", CUST_MOBILE_TXT.Text.Trim()); vHT1.Add("USR_ZONE_ID", CUST_COUNTRY_DDL.SelectedValue); vHT1.Add("USR_REGHQ_ID", ddl_state.SelectedValue); vHT1.Add("USR_ARHQ_ID", CUST_STATION_DDL.SelectedValue); vHT1.Add("USR_VSOHQ_ID", "0"); vHT1.Add("USR_CONT_NAME", CUST_NAME_TXT.Text); vHT1.Add("USR_TYPE", "Doctor"); vHT1.Add("USR_EMAIL", CUST_EMAIL_TXT.Text); DBManager.ExecInsUps(vHT1, "UPDATE_USER", (ATSession)Session["User"]); } } { DBManager.DeleteadminRec(TXTID.Value, "DEL_CUST_PROFILE"); foreach (GridViewRow grw in CUST_PROFILE.Rows) { Hashtable vHashtable1 = new Hashtable(); Label TYPE_ID = (Label)grw.FindControl("CUSTP_TYPE_ID"); Label VALUE = (Label)grw.FindControl("CUSTP_VALUE"); Label DESC = (Label)grw.FindControl("CUSTP_DESC"); vHashtable1.Add("CUST_ID", TXTID.Value); vHashtable1.Add("CUSTP_TYPE_ID", TYPE_ID.Text); vHashtable1.Add("CUSTP_VALUE", VALUE.Text); vHashtable1.Add("CUSTP_DESC", DESC.Text); DBManager.ExecInsUps(vHashtable1, "INS_CUST_PROFILE", (ATSession)Session["User"]); } } ShowMsg(int.Parse(TXTID.Value)); Clear(); Response.Redirect("customer.aspx"); } else { Hashtable vHashtable = new Hashtable(); vHashtable.Add("CUST_ID", TXTID.Value); vHashtable.Add("CUST_VSOHQ_ID", "0"); vHashtable.Add("CUST_STA_ID", ddl_state.SelectedValue); vHashtable.Add("CUST_NAME", CUST_NAME_TXT.Text); vHashtable.Add("CUST_PROSPECTIVE", ddlProspective.SelectedItem.Text); vHashtable.Add("CUST_PREFIX", CUST_PREFIX_NAME.SelectedItem.Text); vHashtable.Add("CUST_ADDRESS", CUST_ADD_TXT.Text); vHashtable.Add("CUST_COMP_NAME", CUST_COMP_NAME_TXT.Text); vHashtable.Add("CUST_DISTRICT", "0"); vHashtable.Add("CUST_VILLAGE_TWN_CITY", txt_vil.Text); vHashtable.Add("CUST_POST_OFFICE", txt_post.Text); vHashtable.Add("CUST_STATE", "0"); vHashtable.Add("CUST_CATRGORY_ID", CUST_CATRGORY_DDL.SelectedValue); vHashtable.Add("CUST_CONSULT_NAME", CUST_CONSL_TXT.Text); vHashtable.Add("CUST_CONSULT_MOB", CUST_CONSL_MOB_TXT.Text); vHashtable.Add("CUST_PIN", CUST_PIN_TXT.Text); vHashtable.Add("CUST_PHONE", CUST_PH_TXT.Text); vHashtable.Add("CUST_EMAIL", CUST_EMAIL_TXT.Text); vHashtable.Add("CUST_MOBILE", CUST_MOBILE_TXT.Text); vHashtable.Add("CUST_DEALER", vATSession.CUST_ID); vHashtable.Add("CUST_DESIGNATION", TXT_DESIGNATION.Text); vHashtable.Add("CUST_COUNTRY_ID", CUST_COUNTRY_DDL.SelectedValue); vHashtable.Add("CUST_ARHQ_ID", HiddenField1.Value); vHashtable.Add("CUST_ORGANIZATION_NAME", ORGANIZATION_DDL.SelectedItem.Text); vHashtable.Add("CUST_FROM_DATE", TXT_START.Text); vHashtable.Add("CUST_TO_DATE", TXT_END.Text); if (DBManager.ExecInsUpsReturn(vHashtable, "INS_CUSTOMER_NEW", (ATSession)Session["User"])) { if (TXTID.Value.Equals("0")) { try { string pwd = Create_Password(); Hashtable vHT = new Hashtable(); vHT.Add("ID", TXTID.Value); if (TXTID.Value == "0") { vHT.Add("USR_LOGIN", CUST_MOBILE_TXT.Text); } else { vHT.Add("USR_LOGIN", CUST_MOBILE_TXT.Text.Trim()); } vHT.Add("USR_COMPANY", CUST_COMP_NAME_TXT.Text); vHT.Add("USR_ZONE_ID", CUST_COUNTRY_DDL.SelectedValue); vHT.Add("USR_REGHQ_ID", ddl_state.SelectedValue); vHT.Add("USR_ARHQ_ID", CUST_STATION_DDL.SelectedValue); vHT.Add("USR_VSOHQ_ID", "0"); vHT.Add("USR_CONT_NAME", CUST_NAME_TXT.Text); vHT.Add("USR_ADDRESS", ""); vHT.Add("USR_TYPE", "Doctor"); vHT.Add("USR_PIN", ""); vHT.Add("USR_PHONE", CUST_PH_TXT.Text); vHT.Add("USR_MOBILE", CUST_MOBILE_TXT.Text); vHT.Add("USR_FAX", ""); vHT.Add("USR_EMAIL", CUST_EMAIL_TXT.Text); vHT.Add("USR_PASSWORD", pwd); vHT.Add("USR_COUNTRY", CUST_COUNTRY_DDL.SelectedValue); vHT.Add("USR_ORGANIZATION_NAME", ORGANIZATION_DDL.Text); DBManager.ExecInsUps(vHT, "INS_USER", (ATSession)Session["User"]); ATApp vATApp = (ATApp)Application["Config"]; String vBody = "Dear " + CUST_NAME_TXT.Text + "\n\nLogin Detaials for Nerdnerdy Web Application.\n\n"; vBody += "URL is: www.nerdnerdy.in\n"; if (TXTID.Value == "0") { vBody += "Login: "******"\nPassword:"******"\n\n"; } else { vBody += "Login: "******"\nPassword:"******"\n\n"; } vBody += "For any query, please revert us back.\n\nThanks and Regards\n"; ATCommon.SendMail(CUST_MOBILE_TXT.Text, "Login Detaials for Nerdnerdy Web Application.", vBody, vATApp); ShowMsg(int.Parse(TXTID.Value)); Clear(); } catch (Exception xe) { ShowMsg(xe); } } else { Hashtable vHT1 = new Hashtable(); vHT1.Add("USR_LOGIN", CUST_MOBILE_TXT.Text.Trim()); vHT1.Add("USR_ZONE_ID", CUST_COUNTRY_DDL.SelectedValue); vHT1.Add("USR_REGHQ_ID", ddl_state.SelectedValue); vHT1.Add("USR_ARHQ_ID", CUST_STATION_DDL.SelectedValue); vHT1.Add("USR_VSOHQ_ID", "0"); vHT1.Add("USR_CONT_NAME", CUST_NAME_TXT.Text); vHT1.Add("USR_TYPE", "Doctor"); vHT1.Add("USR_EMAIL", CUST_EMAIL_TXT.Text); DBManager.ExecInsUps(vHT1, "UPDATE_USER", (ATSession)Session["User"]); } } { DBManager.DeleteadminRec(TXTID.Value, "DEL_CUST_PROFILE"); foreach (GridViewRow grw in CUST_PROFILE.Rows) { Hashtable vHashtable1 = new Hashtable(); Label TYPE_ID = (Label)grw.FindControl("CUSTP_TYPE_ID"); Label VALUE = (Label)grw.FindControl("CUSTP_VALUE"); Label DESC = (Label)grw.FindControl("CUSTP_DESC"); vHashtable1.Add("CUST_ID", TXTID.Value); vHashtable1.Add("CUSTP_TYPE_ID", TYPE_ID.Text); vHashtable1.Add("CUSTP_VALUE", VALUE.Text); vHashtable1.Add("CUSTP_DESC", DESC.Text); DBManager.ExecInsUps(vHashtable1, "INS_CUST_PROFILE", (ATSession)Session["User"]); } } ShowMsg(int.Parse(TXTID.Value)); Clear(); Response.Redirect("customer.aspx"); } } catch (Exception xe) { ShowMsg(xe); } // } } }
protected void btnSave_Click(object sender, EventArgs e) { if (Page.IsValid) { String vID2 = vATSession.Login; Hashtable vHashtable6 = new Hashtable(); vHashtable6.Add("USR_LOGIN", vID2); DataRow vDR6 = RetDR(DBManager.Get(vHashtable6, "GET_USER")); if (vDR6 != null) { HiddenField5.Value = vDR6["USR_ORGANIZATION_NAME"].ToString(); } Hashtable vHashtable15 = new Hashtable(); vHashtable15.Add("USR_LOGIN", vATSession.Login); DataRow vDR15 = RetDR(DBManager.Get(vHashtable15, "GET_TOTALPATIENT")); if (vDR15 != null) { HiddenField7.Value = vDR15["USR_PATIENT_SUBSCRIPTION_NUMBER"].ToString(); } //HiddenField9.Value = TXT_VALUE.Text; String vID = Request.QueryString["ID"]; if (vID != null) { Hashtable vHashtable16 = new Hashtable(); vHashtable16.Add("ID", vID); DataRow vDR16 = RetDR(DBManager.Get(vHashtable16, "GET_CUSTOMER_ID")); if (vDR16 != null) { if (CUST_MOBILE_TXT.Text != vDR16["CUST_MOBILE"].ToString()) { Hashtable vHashtable7 = new Hashtable(); vHashtable7.Add("USR_ORGANIZATION_NAME", HiddenField5.Value); DataRow vDR7 = RetDR(DBManager.Get(vHashtable7, "GET_TOTALPATIENT_NUMBER")); if (vDR7 != null) { HiddenField6.Value = vDR7["USED_PATIENT_SUBSCRIPTION_NUMBER"].ToString(); } } HiddenField6.Value = TXT_VALUE.Text; } } if (HiddenField7.Value != "" && HiddenField6.Value != "") { HiddenField8.Value = Convert.ToString(Convert.ToInt32(HiddenField7.Value) - Convert.ToInt32(HiddenField6.Value)); if (int.Parse(TXT_VALUE.Text) <= int.Parse(HiddenField8.Value)) { btnSave.Visible = true; string PTP_MOBILE = ""; try { if (TXTID.Value == "0") { Hashtable vHashtable = new Hashtable(); vHashtable.Add("CUST_ID", TXTID.Value); vHashtable.Add("CUST_VSOHQ_ID", "0"); vHashtable.Add("CUST_STA_ID", ddl_state.SelectedValue); vHashtable.Add("CUST_NAME", CUST_NAME_TXT.Text); vHashtable.Add("CUST_PROSPECTIVE", ddlProspective.SelectedItem.Text); vHashtable.Add("CUST_PREFIX", ""); vHashtable.Add("CUST_ADDRESS", ""); vHashtable.Add("CUST_COMP_NAME", ""); vHashtable.Add("CUST_DISTRICT", "0"); vHashtable.Add("CUST_VILLAGE_TWN_CITY", ""); vHashtable.Add("CUST_POST_OFFICE", ""); vHashtable.Add("CUST_STATE", "0"); vHashtable.Add("CUST_CATRGORY_ID", ""); vHashtable.Add("CUST_CONSULT_NAME", ""); vHashtable.Add("CUST_CONSULT_MOB", ""); vHashtable.Add("CUST_PIN", ""); vHashtable.Add("CUST_PHONE", ""); vHashtable.Add("CUST_EMAIL", CUST_EMAIL_TXT.Text); vHashtable.Add("CUST_MOBILE", CUST_MOBILE_TXT.Text); vHashtable.Add("CUST_DEALER", vATSession.CUST_ID); vHashtable.Add("CUST_DESIGNATION", TXT_DESIGNATION.Text); vHashtable.Add("CUST_COUNTRY_ID", CUST_COUNTRY_DDL.SelectedValue); vHashtable.Add("CUST_ARHQ_ID", CUST_STATION_DDL.SelectedValue); vHashtable.Add("CUST_ORGANIZATION_NAME", ORGANIZATION_DDL.Text); vHashtable.Add("CUST_FROM_DATE", TXT_START.Text); vHashtable.Add("CUST_TO_DATE", TXT_END.Text); vHashtable.Add("CUST_VALUE", TXT_VALUE.Text); if (DBManager.ExecInsUpsReturn(vHashtable, "INS_CUSTOMER_NEW", (ATSession)Session["User"])) { if (TXTID.Value.Equals("0")) { try { string pwd = Create_Password(); Hashtable vHT = new Hashtable(); vHT.Add("ID", TXTID.Value); if (TXTID.Value == "0") { vHT.Add("USR_LOGIN", CUST_MOBILE_TXT.Text); } else { vHT.Add("USR_LOGIN", CUST_MOBILE_TXT.Text.Trim()); } vHT.Add("USR_ZONE_ID", CUST_COUNTRY_DDL.SelectedValue); vHT.Add("USR_TYPE", "Doctor"); vHT.Add("USR_REGHQ_ID", ddl_state.SelectedValue); vHT.Add("USR_ARHQ_ID", CUST_STATION_DDL.SelectedValue); vHT.Add("USR_VSOHQ_ID", "0"); vHT.Add("USR_COMPANY", ""); vHT.Add("USR_CONT_NAME", CUST_NAME_TXT.Text); vHT.Add("USR_ADDRESS", ""); vHT.Add("USR_PIN", ""); vHT.Add("USR_PHONE", ""); vHT.Add("USR_MOBILE", CUST_MOBILE_TXT.Text); vHT.Add("USR_FAX", ""); vHT.Add("USR_EMAIL", CUST_EMAIL_TXT.Text); vHT.Add("USR_PASSWORD", pwd); vHT.Add("USR_COUNTRY", CUST_COUNTRY_DDL.SelectedValue); vHT.Add("USR_ORGANIZATION_NAME", ORGANIZATION_DDL.Text); vHT.Add("USR_FROM_DATE", TXT_START.Text); vHT.Add("USR_TO_DATE", TXT_END.Text); vHT.Add("USR_SUBSCRIPTION_NUMBER", ""); vHT.Add("USR_PATIENT_SUBSCRIPTION_NUMBER", TXT_VALUE.Text); vHT.Add("USR_CLINICAL_HEAD", ""); DBManager.ExecInsUps(vHT, "INS_USER", (ATSession)Session["User"]); ATApp vATApp = (ATApp)Application["Config"]; String vBody = "Dear " + CUST_NAME_TXT.Text + "\n\nLogin Detaials for NerdNerdy Web Application.\n\n"; vBody += "URL is:www.nerdnerdy.in\n"; vBody += "Login: "******"\nPassword:"******"\n\n"; vBody += "For any query, please revert us back.\n\nThanks and Regards\n"; ATCommon.SendMail(CUST_EMAIL_TXT.Text, "Login Detaials for NerdNerdy Web Application.", vBody, vATApp); ShowMsg(int.Parse(TXTID.Value)); Response.Redirect("UserList.aspx"); Clear(); } catch (Exception xe) { ShowMsg(xe); } } else { Hashtable vHT1 = new Hashtable(); vHT1.Add("USR_LOGIN", CUST_MOBILE_TXT.Text.Trim()); vHT1.Add("USR_ZONE_ID", CUST_COUNTRY_DDL.SelectedValue); vHT1.Add("USR_REGHQ_ID", ddl_state.SelectedValue); vHT1.Add("USR_ARHQ_ID", CUST_STATION_DDL.SelectedValue); vHT1.Add("USR_VSOHQ_ID", "0"); vHT1.Add("USR_CONT_NAME", CUST_NAME_TXT.Text); vHT1.Add("USR_TYPE", "Doctor"); vHT1.Add("USR_EMAIL", CUST_EMAIL_TXT.Text); vHT1.Add("USR_MOBILE", CUST_MOBILE_TXT.Text); vHT1.Add("USR_PATIENT_SUBSCRIPTION_NUMBER", TXT_VALUE.Text); DBManager.ExecInsUps(vHT1, "UPDATE_USER", (ATSession)Session["User"]); } } ShowMsg(int.Parse(TXTID.Value)); Clear(); Response.Redirect("UserList.aspx"); } else { Hashtable vHashtable = new Hashtable(); vHashtable.Add("CUST_ID", TXTID.Value); vHashtable.Add("CUST_VSOHQ_ID", "0"); vHashtable.Add("CUST_STA_ID", ddl_state.SelectedValue); vHashtable.Add("CUST_NAME", CUST_NAME_TXT.Text); vHashtable.Add("CUST_PROSPECTIVE", ddlProspective.SelectedItem.Text); vHashtable.Add("CUST_PREFIX", ""); vHashtable.Add("CUST_ADDRESS", ""); vHashtable.Add("CUST_COMP_NAME", ""); vHashtable.Add("CUST_DISTRICT", "0"); vHashtable.Add("CUST_VILLAGE_TWN_CITY", ""); vHashtable.Add("CUST_POST_OFFICE", ""); vHashtable.Add("CUST_STATE", "0"); vHashtable.Add("CUST_CATRGORY_ID", ""); vHashtable.Add("CUST_CONSULT_NAME", ""); vHashtable.Add("CUST_CONSULT_MOB", ""); vHashtable.Add("CUST_PIN", ""); vHashtable.Add("CUST_PHONE", ""); vHashtable.Add("CUST_EMAIL", CUST_EMAIL_TXT.Text); vHashtable.Add("CUST_MOBILE", CUST_MOBILE_TXT.Text); vHashtable.Add("CUST_DEALER", vATSession.CUST_ID); vHashtable.Add("CUST_DESIGNATION", TXT_DESIGNATION.Text); vHashtable.Add("CUST_COUNTRY_ID", CUST_COUNTRY_DDL.SelectedValue); vHashtable.Add("CUST_ARHQ_ID", HiddenField1.Value); vHashtable.Add("CUST_ORGANIZATION_NAME", ORGANIZATION_DDL.Text); vHashtable.Add("CUST_FROM_DATE", TXT_START.Text); vHashtable.Add("CUST_TO_DATE", TXT_END.Text); vHashtable.Add("CUST_VALUE", TXT_VALUE.Text); if (DBManager.ExecInsUpsReturn(vHashtable, "INS_CUSTOMER_NEW", (ATSession)Session["User"])) { if (TXTID.Value.Equals("0")) { try { string pwd = Create_Password(); Hashtable vHT = new Hashtable(); vHT.Add("ID", TXTID.Value); if (TXTID.Value == "0") { vHT.Add("USR_LOGIN", CUST_MOBILE_TXT.Text); } else { vHT.Add("USR_LOGIN", CUST_MOBILE_TXT.Text.Trim()); } vHT.Add("USR_COMPANY", ""); vHT.Add("USR_ZONE_ID", CUST_COUNTRY_DDL.SelectedValue); vHT.Add("USR_REGHQ_ID", ddl_state.SelectedValue); vHT.Add("USR_ARHQ_ID", CUST_STATION_DDL.SelectedValue); vHT.Add("USR_VSOHQ_ID", "0"); vHT.Add("USR_CONT_NAME", CUST_NAME_TXT.Text); vHT.Add("USR_ADDRESS", ""); vHT.Add("USR_TYPE", "Doctor"); vHT.Add("USR_PIN", ""); vHT.Add("USR_PHONE", ""); vHT.Add("USR_MOBILE", CUST_MOBILE_TXT.Text); vHT.Add("USR_FAX", ""); vHT.Add("USR_EMAIL", CUST_EMAIL_TXT.Text); vHT.Add("USR_PASSWORD", pwd); vHT.Add("USR_COUNTRY", CUST_COUNTRY_DDL.SelectedValue); vHT.Add("USR_ORGANIZATION_NAME", ORGANIZATION_DDL.Text); vHT.Add("USR_FROM_DATE", TXT_START.Text); vHT.Add("USR_TO_DATE", TXT_END.Text); vHT.Add("USR_SUBSCRIPTION_NUMBER", ""); vHT.Add("USR_PATIENT_SUBSCRIPTION_NUMBER", TXT_VALUE.Text); vHT.Add("USR_CLINICAL_HEAD", ""); DBManager.ExecInsUps(vHT, "INS_USER", (ATSession)Session["User"]); ATApp vATApp = (ATApp)Application["Config"]; String vBody = "Dear " + CUST_NAME_TXT.Text + "\n\nLogin Detaials for NerdNerdy Web Application.\n\n"; vBody += "URL is: www.nerdnerdy.in\n"; vBody += "Login: "******"\nPassword:"******"\n\n"; vBody += "For any query, please revert us back.\n\nThanks and Regards\n"; ATCommon.SendMail(CUST_EMAIL_TXT.Text, "Login Detaials for NerdNerdy Web Application.", vBody, vATApp); ShowMsg(int.Parse(TXTID.Value)); Response.Redirect("UserList.aspx"); Clear(); } catch (Exception xe) { ShowMsg(xe); } } else { Hashtable vHT1 = new Hashtable(); vHT1.Add("USR_LOGIN", CUST_MOBILE_TXT.Text.Trim()); vHT1.Add("USR_ZONE_ID", CUST_COUNTRY_DDL.SelectedValue); vHT1.Add("USR_REGHQ_ID", ddl_state.SelectedValue); vHT1.Add("USR_ARHQ_ID", CUST_STATION_DDL.SelectedValue); vHT1.Add("USR_VSOHQ_ID", "0"); vHT1.Add("USR_CONT_NAME", CUST_NAME_TXT.Text); vHT1.Add("USR_TYPE", "Doctor"); vHT1.Add("USR_EMAIL", CUST_EMAIL_TXT.Text); vHT1.Add("USR_MOBILE", CUST_MOBILE_TXT.Text); vHT1.Add("USR_PATIENT_SUBSCRIPTION_NUMBER", TXT_VALUE.Text); DBManager.ExecInsUps(vHT1, "UPDATE_USER", (ATSession)Session["User"]); } } ShowMsg(int.Parse(TXTID.Value)); Clear(); Response.Redirect("UserList.aspx"); } } catch (Exception xe) { ShowMsg(xe); } } else { string message = "You Have Less Patient Subscription as subscribed !!"; System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append("<script type = 'text/javascript'>"); sb.Append("window.onload=function(){"); sb.Append("alert('"); sb.Append(message); sb.Append("')};"); sb.Append("</script>"); ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", sb.ToString()); } } } }
protected void btnSave_Click(object sender, EventArgs e) { if (Page.IsValid) { try { if (TXTID.Value == "0") { Hashtable vHashtable = new Hashtable(); vHashtable.Add("CUST_ID", TXTID.Value); vHashtable.Add("CUST_VSOHQ_ID", "0"); vHashtable.Add("CUST_STA_ID", RegioanlHQ_DDL.SelectedValue.ToString()); vHashtable.Add("CUST_NAME", TXT_ORGANIZATION.Text); vHashtable.Add("CUST_PROSPECTIVE", ""); vHashtable.Add("CUST_PREFIX", ""); vHashtable.Add("CUST_ADDRESS", TXT_ADDRESS.Text); vHashtable.Add("CUST_COMP_NAME", TXT_ORGANIZATION.Text); vHashtable.Add("CUST_DISTRICT", "0"); vHashtable.Add("CUST_VILLAGE_TWN_CITY", ""); vHashtable.Add("CUST_POST_OFFICE", ""); vHashtable.Add("CUST_STATE", "0"); vHashtable.Add("CUST_CATRGORY_ID", ""); vHashtable.Add("CUST_CONSULT_NAME", ""); vHashtable.Add("CUST_CONSULT_MOB", TXT_MOBILE_NO.Text); vHashtable.Add("CUST_PIN", TXT_PIN.Text); vHashtable.Add("CUST_PHONE", TXT_MOBILE_NO.Text); vHashtable.Add("CUST_EMAIL", TXT_EMAIL.Text); vHashtable.Add("CUST_MOBILE", TXT_MOBILE_NO.Text); vHashtable.Add("CUST_DEALER", vATSession.CUST_ID); vHashtable.Add("CUST_DESIGNATION", ""); vHashtable.Add("CUST_COUNTRY_ID", CUST_COUNTRY_DDL.SelectedValue); vHashtable.Add("CUST_ARHQ_ID", AreaHQ_DDL.SelectedValue.ToString()); vHashtable.Add("CUST_ORGANIZATION_NAME", TXT_ORGANIZATION.Text); vHashtable.Add("CUST_FROM_DATE", TXT_START.Text); vHashtable.Add("CUST_TO_DATE", TXT_END.Text); vHashtable.Add("CUST_VALUE", TXT_PATIENT.Text); if (DBManager.ExecInsUpsReturn(vHashtable, "INS_CUSTOMER_NEW", (ATSession)Session["User"])) { if (HiddenField1.Value.Equals("0")) { try { string pwd = Create_Password(); Hashtable vHT = new Hashtable(); vHT.Add("ID", HiddenField1.Value); vHT.Add("USR_LOGIN", TXT_MOBILE_NO.Text); vHT.Add("USR_PASSWORD", pwd); vHT.Add("USR_TYPE", DDL_USER_TYPE.SelectedValue); vHT.Add("USR_COMPANY", vATSession.Company.ToString()); vHT.Add("USR_ZONE_ID", "0"); vHT.Add("USR_REGHQ_ID", RegioanlHQ_DDL.SelectedValue.ToString()); vHT.Add("USR_ARHQ_ID", AreaHQ_DDL.SelectedValue.ToString()); vHT.Add("USR_VSOHQ_ID", "0"); vHT.Add("USR_COUNTRY", CUST_COUNTRY_DDL.SelectedValue.ToString()); vHT.Add("USR_CONT_NAME", ""); vHT.Add("USR_ADDRESS", TXT_ADDRESS.Text); vHT.Add("USR_PIN", TXT_PIN.Text); vHT.Add("USR_PHONE", TXT_MOBILE_NO.Text); vHT.Add("USR_MOBILE", TXT_MOBILE_NO.Text); vHT.Add("USR_FAX", ""); vHT.Add("USR_EMAIL", TXT_EMAIL.Text); vHT.Add("USR_ORGANIZATION_NAME", TXT_ORGANIZATION.Text); vHT.Add("USR_FROM_DATE", TXT_START.Text); vHT.Add("USR_TO_DATE", TXT_END.Text); vHT.Add("USR_SUBSCRIPTION_NUMBER", TXT_Sub.Text); vHT.Add("USR_PATIENT_SUBSCRIPTION_NUMBER", TXT_PATIENT.Text); vHT.Add("USR_CLINICAL_HEAD", ""); DBManager.ExecInsUps(vHT, "INS_USER", (ATSession)Session["User"]); ATApp vATApp = (ATApp)Application["Config"]; String vBody = "Dear " + "" + "\n\nLogin Details for NerdNerdy Web Application.\n\n"; vBody += "URL is: www.nerdnerdy.in\n"; vBody += "Login: "******"\nPassword:"******"\n\n"; vBody += "For any query, please revert us back.\n\nThanks and Regards\n"; ATCommon.SendMail(TXT_EMAIL.Text, "Login Details for NerdNerdy Application.", vBody, vATApp); ShowMsg(int.Parse(TXTID.Value)); Clear(); } catch (Exception xe) { ShowMsg(xe); } } else { Hashtable vHT1 = new Hashtable(); vHT1.Add("USR_LOGIN", TXT_MOBILE_NO.Text.Trim()); vHT1.Add("USR_ZONE_ID", ""); vHT1.Add("USR_REGHQ_ID", RegioanlHQ_DDL.SelectedValue.ToString()); vHT1.Add("USR_ARHQ_ID", AreaHQ_DDL.SelectedValue.ToString()); vHT1.Add("USR_VSOHQ_ID", "0"); vHT1.Add("USR_CONT_NAME", TXT_ORGANIZATION.Text); vHT1.Add("USR_TYPE", "ORGANIZATION"); vHT1.Add("USR_EMAIL", TXT_EMAIL.Text); vHT1.Add("USR_MOBILE", TXT_MOBILE_NO.Text); DBManager.ExecInsUps(vHT1, "UPDATE_USER", (ATSession)Session["User"]); } ShowMsg(int.Parse(TXTID.Value)); Clear(); Response.Redirect("User_AdminList.aspx"); } } else { Hashtable vHashtable = new Hashtable(); vHashtable.Add("CUST_ID", TXTID.Value); vHashtable.Add("CUST_VSOHQ_ID", "0"); vHashtable.Add("CUST_STA_ID", RegioanlHQ_DDL.SelectedValue.ToString()); vHashtable.Add("CUST_NAME", TXT_ORGANIZATION.Text); vHashtable.Add("CUST_PROSPECTIVE", ""); vHashtable.Add("CUST_PREFIX", ""); vHashtable.Add("CUST_ADDRESS", TXT_ADDRESS.Text); vHashtable.Add("CUST_COMP_NAME", TXT_ORGANIZATION.Text); vHashtable.Add("CUST_DISTRICT", "0"); vHashtable.Add("CUST_VILLAGE_TWN_CITY", ""); vHashtable.Add("CUST_POST_OFFICE", ""); vHashtable.Add("CUST_STATE", "0"); vHashtable.Add("CUST_CATRGORY_ID", ""); vHashtable.Add("CUST_CONSULT_NAME", ""); vHashtable.Add("CUST_CONSULT_MOB", TXT_MOBILE_NO.Text); vHashtable.Add("CUST_PIN", TXT_PIN.Text); vHashtable.Add("CUST_PHONE", TXT_MOBILE_NO.Text); vHashtable.Add("CUST_EMAIL", TXT_EMAIL.Text); vHashtable.Add("CUST_MOBILE", TXT_MOBILE_NO.Text); vHashtable.Add("CUST_DEALER", vATSession.CUST_ID); vHashtable.Add("CUST_DESIGNATION", ""); vHashtable.Add("CUST_COUNTRY_ID", CUST_COUNTRY_DDL.SelectedValue); vHashtable.Add("CUST_ARHQ_ID", AreaHQ_DDL.SelectedValue.ToString()); vHashtable.Add("CUST_ORGANIZATION_NAME", TXT_ORGANIZATION.Text); vHashtable.Add("CUST_FROM_DATE", TXT_START.Text); vHashtable.Add("CUST_TO_DATE", TXT_END.Text); vHashtable.Add("CUST_VALUE", TXT_PATIENT.Text); if (DBManager.ExecInsUpsReturn(vHashtable, "INS_CUSTOMER_NEW", (ATSession)Session["User"])) { if (HiddenField1.Value.Equals("0")) { try { Hashtable vHT = new Hashtable(); vHT.Add("ID", HiddenField1.Value); vHT.Add("USR_LOGIN", TXT_MOBILE_NO.Text); vHT.Add("USR_PASSWORD", TXT_PASSWORD.Text); vHT.Add("USR_TYPE", DDL_USER_TYPE.SelectedValue); vHT.Add("USR_COMPANY", vATSession.Company.ToString()); vHT.Add("USR_ZONE_ID", "0"); vHT.Add("USR_REGHQ_ID", RegioanlHQ_DDL.SelectedValue.ToString()); vHT.Add("USR_ARHQ_ID", AreaHQ_DDL.SelectedValue.ToString()); vHT.Add("USR_VSOHQ_ID", "0"); vHT.Add("USR_COUNTRY", CUST_COUNTRY_DDL.SelectedValue.ToString()); vHT.Add("USR_CONT_NAME", ""); vHT.Add("USR_ADDRESS", TXT_ADDRESS.Text); vHT.Add("USR_PIN", TXT_PIN.Text); vHT.Add("USR_PHONE", TXT_MOBILE_NO.Text); vHT.Add("USR_MOBILE", TXT_MOBILE_NO.Text); vHT.Add("USR_FAX", ""); vHT.Add("USR_EMAIL", TXT_EMAIL.Text); vHT.Add("USR_ORGANIZATION_NAME", TXT_ORGANIZATION.Text); vHT.Add("USR_FROM_DATE", TXT_START.Text); vHT.Add("USR_TO_DATE", TXT_END.Text); vHT.Add("USR_SUBSCRIPTION_NUMBER", TXT_Sub.Text); vHT.Add("USR_PATIENT_SUBSCRIPTION_NUMBER", TXT_PATIENT.Text); vHT.Add("USR_CLINICAL_HEAD", ""); DBManager.ExecInsUps(vHT, "INS_USER", (ATSession)Session["User"]); ATApp vATApp = (ATApp)Application["Config"]; String vBody = "Dear " + "" + "\n\nLogin Details for NerdNerdy Web Application.\n\n"; vBody += "URL is: www.nerdnerdy.in\n"; vBody += "Login: "******"\nPassword:"******"\n\n"; vBody += "For any query, please revert us back.\n\nThanks and Regards\n"; ATCommon.SendMail(TXT_EMAIL.Text, "Login Details for NerdNerdy Application.", vBody, vATApp); ShowMsg(int.Parse(TXTID.Value)); Clear(); } catch (Exception xe) { ShowMsg(xe); } } else { Hashtable vHT1 = new Hashtable(); vHT1.Add("USR_LOGIN", TXT_MOBILE_NO.Text.Trim()); vHT1.Add("USR_ZONE_ID", ""); vHT1.Add("USR_REGHQ_ID", RegioanlHQ_DDL.SelectedValue.ToString()); vHT1.Add("USR_ARHQ_ID", AreaHQ_DDL.SelectedValue.ToString()); vHT1.Add("USR_VSOHQ_ID", "0"); vHT1.Add("USR_CONT_NAME", TXT_ORGANIZATION.Text); vHT1.Add("USR_TYPE", "ORGANIZATION"); vHT1.Add("USR_EMAIL", TXT_EMAIL.Text); vHT1.Add("USR_MOBILE", TXT_MOBILE_NO.Text); DBManager.ExecInsUps(vHT1, "UPDATE_USER", (ATSession)Session["User"]); } ShowMsg(int.Parse(TXTID.Value)); Clear(); Response.Redirect("User_AdminList.aspx"); } } } catch (Exception xe) { ShowMsg(xe); } } }
protected void Savebtn_Click(object sender, EventArgs e) { try { SqlConnection con = new SqlConnection("Data Source=182.18.187.118;Initial Catalog=DEMO_NERDNERDY;User ID=sa;Password=GTAalm6FPML4n6t$;"); SqlCommand cmd = new SqlCommand("INS_CUSTOMER_NEW", con); cmd.CommandType = CommandType.StoredProcedure; con.Open(); SqlTransaction tran = con.BeginTransaction(); cmd.Parameters.AddWithValue("CUST_ID", TXTID.Value); cmd.Parameters.AddWithValue("CUST_VSOHQ_ID", "0"); cmd.Parameters.AddWithValue("CUST_STA_ID", "0"); cmd.Parameters.AddWithValue("CUST_NAME", TXT_ORGANIZATION.Text); cmd.Parameters.AddWithValue("CUST_PROSPECTIVE", ""); cmd.Parameters.AddWithValue("CUST_PREFIX", ""); cmd.Parameters.AddWithValue("CUST_ADDRESS", ""); cmd.Parameters.AddWithValue("CUST_COMP_NAME", TXT_ORGANIZATION.Text); cmd.Parameters.AddWithValue("CUST_DISTRICT", "0"); cmd.Parameters.AddWithValue("CUST_VILLAGE_TWN_CITY", ""); cmd.Parameters.AddWithValue("CUST_POST_OFFICE", ""); cmd.Parameters.AddWithValue("CUST_STATE", "0"); cmd.Parameters.AddWithValue("CUST_CATRGORY_ID", ""); cmd.Parameters.AddWithValue("CUST_CONSULT_NAME", ""); cmd.Parameters.AddWithValue("CUST_CONSULT_MOB", TXT_MOBILE_NO.Text); cmd.Parameters.AddWithValue("CUST_PIN", "000"); cmd.Parameters.AddWithValue("CUST_PHONE", TXT_MOBILE_NO.Text); cmd.Parameters.AddWithValue("CUST_EMAIL", TXT_EMAIL.Text); cmd.Parameters.AddWithValue("CUST_MOBILE", TXT_MOBILE_NO.Text); cmd.Parameters.AddWithValue("CUST_DEALER", "0"); cmd.Parameters.AddWithValue("CUST_DESIGNATION", ""); cmd.Parameters.AddWithValue("CUST_COUNTRY_ID", "0"); cmd.Parameters.AddWithValue("CUST_ARHQ_ID", "0"); cmd.Parameters.AddWithValue("CUST_ORGANIZATION_NAME", TXT_ORGANIZATION.Text); cmd.Parameters.AddWithValue("CUST_FROM_DATE", "2020-08-01 00:00:00.000"); cmd.Parameters.AddWithValue("CUST_TO_DATE", "2021-08-01 00:00:00.000"); cmd.Parameters.AddWithValue("CUST_VALUE", "1"); cmd.Parameters.AddWithValue("last_user", "Therapist"); SqlCommand cmd1 = new SqlCommand("INS_USER", con); string pwd = Create_Password(); cmd1.Parameters.AddWithValue("ID", HiddenField1.Value); cmd1.Parameters.AddWithValue("USR_LOGIN", TXT_MOBILE_NO.Text); cmd1.Parameters.AddWithValue("USR_PASSWORD", pwd); cmd1.Parameters.AddWithValue("USR_TYPE", DDL_USER_TYPE.SelectedValue); cmd1.Parameters.AddWithValue("USR_COMPANY", "NERDNERDY"); cmd1.Parameters.AddWithValue("USR_ZONE_ID", "0"); cmd1.Parameters.AddWithValue("USR_REGHQ_ID", "0"); cmd1.Parameters.AddWithValue("USR_ARHQ_ID", "0"); cmd1.Parameters.AddWithValue("USR_VSOHQ_ID", "0"); cmd1.Parameters.AddWithValue("USR_COUNTRY", "0"); cmd1.Parameters.AddWithValue("USR_CONT_NAME", ""); cmd1.Parameters.AddWithValue("USR_ADDRESS", ""); cmd1.Parameters.AddWithValue("USR_PIN", ""); cmd1.Parameters.AddWithValue("USR_PHONE", TXT_MOBILE_NO.Text); cmd1.Parameters.AddWithValue("USR_MOBILE", TXT_MOBILE_NO.Text); cmd1.Parameters.AddWithValue("USR_FAX", ""); cmd1.Parameters.AddWithValue("USR_EMAIL", TXT_EMAIL.Text); cmd1.Parameters.AddWithValue("USR_ORGANIZATION_NAME", TXT_ORGANIZATION.Text); cmd1.Parameters.AddWithValue("USR_FROM_DATE", ""); cmd1.Parameters.AddWithValue("USR_TO_DATE", ""); cmd1.Parameters.AddWithValue("USR_SUBSCRIPTION_NUMBER", "1"); cmd1.Parameters.AddWithValue("USR_PATIENT_SUBSCRIPTION_NUMBER", "1"); cmd1.Parameters.AddWithValue("USR_CLINICAL_HEAD", ""); ATApp vATApp = (ATApp)Application["Config"]; String vBody = "Dear " + "" + "\n\nLogin Details for NerdNerdy Web Application.\n\n"; vBody += "URL is: www.nerdnerdy.in\n"; vBody += "Login: "******"\nPassword:"******"\n\n"; vBody += "For any query, please revert us back.\n\nThanks and Regards\n"; ATCommon.SendMail(TXT_EMAIL.Text, "Login Details for NerdNerdy Application.", vBody, vATApp); ShowMsg(int.Parse(TXTID.Value)); int k = cmd.ExecuteNonQuery(); int k1 = cmd1.ExecuteNonQuery(); //tran.commit(); cmd1.Parameters.Clear(); tran.Commit(); lblmsg.Text = "Record Inserted Succesfully into the Database"; ///frmload(); } catch (Exception exRollback) { Console.WriteLine(exRollback.Message); } //} //int k = cmd.ExecuteNonQuery(); //if (k != 0) //{ // lblmsg.Text = "Record Inserted Succesfully into the Database"; // lblmsg.ForeColor = System.Drawing.Color.CornflowerBlue; //} //con.Close(); //if (Page.IsValid) //{ // try // { // if (TXTID.Value == "0") // { // Hashtable vHashtable = new Hashtable(); // vHashtable.Add("CUST_ID", TXTID.Value); // vHashtable.Add("CUST_VSOHQ_ID", "0"); // vHashtable.Add("CUST_STA_ID", "0"); // vHashtable.Add("CUST_NAME", TXT_ORGANIZATION.Text); // vHashtable.Add("CUST_PROSPECTIVE", ""); // vHashtable.Add("CUST_PREFIX", ""); // vHashtable.Add("CUST_ADDRESS", TXT_ADDRESS.Text); // vHashtable.Add("CUST_COMP_NAME", TXT_ORGANIZATION.Text); // vHashtable.Add("CUST_DISTRICT", "0"); // vHashtable.Add("CUST_VILLAGE_TWN_CITY", ""); // vHashtable.Add("CUST_POST_OFFICE", ""); // vHashtable.Add("CUST_STATE", "0"); // vHashtable.Add("CUST_CATRGORY_ID", ""); // vHashtable.Add("CUST_CONSULT_NAME", ""); // vHashtable.Add("CUST_CONSULT_MOB", TXT_MOBILE_NO.Text); // vHashtable.Add("CUST_PIN", "000"); // vHashtable.Add("CUST_PHONE", TXT_MOBILE_NO.Text); // vHashtable.Add("CUST_EMAIL", TXT_EMAIL.Text); // vHashtable.Add("CUST_MOBILE", TXT_MOBILE_NO.Text); // vHashtable.Add("CUST_DEALER", "0"); // vHashtable.Add("CUST_DESIGNATION", ""); // vHashtable.Add("CUST_COUNTRY_ID", "0"); // vHashtable.Add("CUST_ARHQ_ID", "0"); // vHashtable.Add("CUST_ORGANIZATION_NAME", TXT_ORGANIZATION.Text); // vHashtable.Add("CUST_FROM_DATE", "2020-08-01 00:00:00.000"); // vHashtable.Add("CUST_TO_DATE", "2021-08-01 00:00:00.000"); // vHashtable.Add("CUST_VALUE", "1"); // //if (DBManager.ExecInsUpsReturn(vHashtable, "INS_CUSTOMER_NEW", (ATSession)Session["User"])) // { // if (HiddenField1.Value.Equals("0")) // { // try // { // string pwd = Create_Password(); // Hashtable vHT = new Hashtable(); // vHT.Add("ID", HiddenField1.Value); // vHT.Add("USR_LOGIN", TXT_MOBILE_NO.Text); // vHT.Add("USR_PASSWORD", pwd); // vHT.Add("USR_TYPE", "Therapist"); // vHT.Add("USR_COMPANY", "NERDNERDY"); // vHT.Add("USR_ZONE_ID", "0"); // vHT.Add("USR_REGHQ_ID", "0"); // vHT.Add("USR_ARHQ_ID", "0"); // vHT.Add("USR_VSOHQ_ID", "0"); // vHT.Add("USR_COUNTRY", "0"); // vHT.Add("USR_CONT_NAME", ""); // vHT.Add("USR_ADDRESS", TXT_ADDRESS.Text); // vHT.Add("USR_PIN", ""); // vHT.Add("USR_PHONE", TXT_MOBILE_NO.Text); // vHT.Add("USR_MOBILE", TXT_MOBILE_NO.Text); // vHT.Add("USR_FAX", ""); // vHT.Add("USR_EMAIL", TXT_EMAIL.Text); // vHT.Add("USR_ORGANIZATION_NAME", TXT_ORGANIZATION.Text); // vHT.Add("USR_FROM_DATE", ""); // vHT.Add("USR_TO_DATE", ""); // vHT.Add("USR_SUBSCRIPTION_NUMBER", "1"); // vHT.Add("USR_PATIENT_SUBSCRIPTION_NUMBER", "1"); // vHT.Add("USR_CLINICAL_HEAD", ""); // DBManager.ExecInsUps(vHT, "INS_USER", (ATSession)Session["User"]); // ATApp vATApp = (ATApp)Application["Config"]; // String vBody = "Dear " + "" + "\n\nLogin Details for NerdNerdy Web Application.\n\n"; // vBody += "URL is: www.demo.nerdnerdy.in\n"; // vBody += "Login: "******"\nPassword:"******"\n\n"; // vBody += "For any query, please revert us back.\n\nThanks and Regards\n"; // ATCommon.SendMail(TXT_EMAIL.Text, "Login Details for NerdNerdy Application.", vBody, vATApp); // ShowMsg(int.Parse(TXTID.Value)); // } // catch (Exception xe) // { // ShowMsg(xe); // } // } // ShowMsg(int.Parse(TXTID.Value)); // // Response.Redirect("Default.aspx"); // } // } // else // { // Hashtable vHashtable = new Hashtable(); // vHashtable.Add("CUST_ID", TXTID.Value); // vHashtable.Add("CUST_VSOHQ_ID", "0"); // vHashtable.Add("CUST_STA_ID", "0"); // vHashtable.Add("CUST_NAME", TXT_ORGANIZATION.Text); // vHashtable.Add("CUST_PROSPECTIVE", ""); // vHashtable.Add("CUST_PREFIX", ""); // vHashtable.Add("CUST_ADDRESS", TXT_ADDRESS.Text); // vHashtable.Add("CUST_COMP_NAME", TXT_ORGANIZATION.Text); // vHashtable.Add("CUST_DISTRICT", ""); // vHashtable.Add("CUST_VILLAGE_TWN_CITY", ""); // vHashtable.Add("CUST_POST_OFFICE", ""); // vHashtable.Add("CUST_STATE", "0"); // vHashtable.Add("CUST_CATRGORY_ID", ""); // vHashtable.Add("CUST_CONSULT_NAME", ""); // vHashtable.Add("CUST_CONSULT_MOB", TXT_MOBILE_NO.Text); // vHashtable.Add("CUST_PIN", "00"); // vHashtable.Add("CUST_PHONE", TXT_MOBILE_NO.Text); // vHashtable.Add("CUST_EMAIL", TXT_EMAIL.Text); // vHashtable.Add("CUST_MOBILE", TXT_MOBILE_NO.Text); // vHashtable.Add("CUST_DEALER", ""); // vHashtable.Add("CUST_DESIGNATION", ""); // vHashtable.Add("CUST_COUNTRY_ID", "0"); // vHashtable.Add("CUST_ARHQ_ID", "0"); // vHashtable.Add("CUST_ORGANIZATION_NAME", TXT_ORGANIZATION.Text); // vHashtable.Add("CUST_FROM_DATE", ""); // vHashtable.Add("CUST_TO_DATE", ""); // vHashtable.Add("CUST_VALUE", "1"); // if (DBManager.ExecInsUpsReturn(vHashtable, "INS_CUSTOMER_NEW", (ATSession)Session["User"])) // { // if (HiddenField1.Value.Equals("0")) // { // try // { // string pwd = Create_Password(); // Hashtable vHT = new Hashtable(); // vHT.Add("ID", HiddenField1.Value); // vHT.Add("USR_LOGIN", TXT_MOBILE_NO.Text); // vHT.Add("USR_PASSWORD", pwd); // vHT.Add("USR_TYPE", "Therapist"); // vHT.Add("USR_COMPANY", vATSession.Company.ToString()); // vHT.Add("USR_ZONE_ID", "0"); // vHT.Add("USR_REGHQ_ID", "0"); // vHT.Add("USR_ARHQ_ID", "0"); // vHT.Add("USR_VSOHQ_ID", "0"); // vHT.Add("USR_COUNTRY", "0"); // vHT.Add("USR_CONT_NAME", ""); // vHT.Add("USR_ADDRESS", TXT_ADDRESS.Text); // vHT.Add("USR_PIN", ""); // vHT.Add("USR_PHONE", TXT_MOBILE_NO.Text); // vHT.Add("USR_MOBILE", TXT_MOBILE_NO.Text); // vHT.Add("USR_FAX", ""); // vHT.Add("USR_EMAIL", TXT_EMAIL.Text); // vHT.Add("USR_ORGANIZATION_NAME", TXT_ORGANIZATION.Text); // vHT.Add("USR_FROM_DATE", ""); // vHT.Add("USR_TO_DATE", ""); // vHT.Add("USR_SUBSCRIPTION_NUMBER", "1"); // vHT.Add("USR_PATIENT_SUBSCRIPTION_NUMBER", "1"); // vHT.Add("USR_CLINICAL_HEAD", ""); // DBManager.ExecInsUps(vHT, "INS_USER", (ATSession)Session["User"]); // ATApp vATApp = (ATApp)Application["Config"]; // String vBody = "Dear " + "" + "\n\nLogin Details for NerdNerdy Web Application.\n\n"; // vBody += "URL is: www.demo.nerdnerdy.in\n"; // vBody += "Login: "******"\nPassword:"******"\n\n"; // vBody += "For any query, please revert us back.\n\nThanks and Regards\n"; // ATCommon.SendMail(TXT_EMAIL.Text, "Login Details for NerdNerdy Application.", vBody, vATApp); // ShowMsg(int.Parse(TXTID.Value)); // } // catch (Exception xe) // { // ShowMsg(xe); // } // } // ShowMsg(int.Parse(TXTID.Value)); // Response.Redirect("Default.aspx"); // } // } // } // catch (Exception xe) // { // ShowMsg(xe); // } //} }