public void AppSetup() { if (ConfigurationManager.AppSettings["LOGPATH"] != null && ConfigurationManager.AppSettings["LOGPATH"].Length > 0) { LOG_PATH = ConfigurationManager.AppSettings["LOGPATH"].Trim(); } if (ConfigurationManager.AppSettings["RFQ_PATH"] != null && ConfigurationManager.AppSettings["RFQ_PATH"].Length > 0) { RFQ_PATH = ConfigurationManager.AppSettings["RFQ_PATH"].Trim(); } if (ConfigurationManager.AppSettings["ACTIONS"] != null && ConfigurationManager.AppSettings["ACTIONS"].Length > 0) { ACTIONS = ConfigurationManager.AppSettings["ACTIONS"].Split(','); } if (ConfigurationManager.AppSettings["MAILFILE_PATH"] != null && ConfigurationManager.AppSettings["MAILFILE_PATH"].Length > 0) { MAILFILE_PATH = ConfigurationManager.AppSettings["MAILFILE_PATH"].Trim(); } if (ConfigurationManager.AppSettings["ATTACHMENT_INBOX"] != null && ConfigurationManager.AppSettings["ATTACHMENT_INBOX"].Length > 0) { ATTACHMENT_INBOX = ConfigurationManager.AppSettings["ATTACHMENT_INBOX"].Trim(); } if (ConfigurationManager.AppSettings["SHOW_FORM"] != null && ConfigurationManager.AppSettings["SHOW_FORM"].Length > 0) { SHOW_FORM = ConfigurationManager.AppSettings["SHOW_FORM"].Trim(); } if (LOG_PATH == "") { LOG_PATH = Application.StartupPath + "\\Log"; } if (RFQ_PATH == "") { RFQ_PATH = Application.StartupPath + "\\RFQ"; } if (MAILFILE_PATH == "") { MAILFILE_PATH = Application.StartupPath + "\\Mail_Files"; } if (ATTACHMENT_INBOX == "") { ATTACHMENT_INBOX = Application.StartupPath + "\\Attachment_Inbox"; } if (SHOW_FORM == "") { SHOW_FORM = "FALSE"; } Mail_Template = Application.StartupPath + "\\Mail_Temp\\ESUPPLIER_MESSAGE.txt"; FROM_EMAIL_ID = ConfigurationManager.AppSettings["FROM_EMAIL_ID"].Trim(); MAIL_BCC = ConfigurationManager.AppSettings["MAIL_BCC"].Trim(); this.Visible = (SHOW_FORM.ToUpper() == "FALSE") ? false : true; }
public void Showform() { if (SHOW_FORM.ToUpper() == "FALSE") { this.Visible = false; } else { this.Visible = true; } }