private void SetWelcomeMessage()
        {
            MembershipUser user = Membership.GetUser();

            if (user != null)
            {
                string str = user.ToString();
                if (Roles.IsUserInRole(str, "Admin"))
                {
                    this.objCompanyLoginMasterDT = this.objCompanyLoginMasterBll.GetDataByCompanyLoginName(str);
                    if (this.objCompanyLoginMasterDT.Rows.Count > 0)
                    {
                        this.hfCompanyID.Value = this.objCompanyLoginMasterDT.Rows[0]["CompanyID"].ToString();
                    }
                }
                else if (Roles.IsUserInRole(str, "Employee"))
                {
                    this.objStaffMasterDT = this.objStaffMasterBll.GetDataByStaffUserName(str);
                    if (this.objStaffMasterDT.Rows.Count > 0)
                    {
                        this.hfCompanyID.Value = this.objStaffMasterDT.Rows[0]["CompanyID"].ToString();
                    }
                }
            }
            this.objMiscellaneousMasterDT = this.objMiscellaneousMasterBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value));
            if (this.objMiscellaneousMasterDT.Rows.Count <= 0)
            {
                return;
            }
            this.lblStaffWelcomeMsg.Text = this.objMiscellaneousMasterDT.Rows[0]["WelcomeMessagesStaff"].ToString();
            this.welcomeDiv.Visible      = !string.IsNullOrEmpty(this.lblStaffWelcomeMsg.Text);
        }
 private void SetMiscValues(string companyId)
 {
     this.objCompanyMasterDT       = this.objCompanyMasterBll.GetDataByCompanyID(int.Parse(companyId));
     this.lblCompanyName.Text      = this.objCompanyMasterDT.Rows[0]["CompanyName"].ToString();
     this.objMiscellaneousMasterDT = this.objMiscellaneousMasterBll.GetDataByCompanyID(int.Parse(companyId));
     if (this.objMiscellaneousMasterDT.Rows.Count <= 0)
     {
         return;
     }
     if (string.IsNullOrEmpty(this.txtDateFrom.Text.Trim()) || string.IsNullOrEmpty(this.txtDateTo.Text.Trim()))
     {
         DateTime dateTime = new DateTime(DateTime.Now.Year, 1, 1);
         DateTime now      = DateTime.Now;
         this.txtDateFrom.Text     = dateTime.ToString(this.dateFormat);
         this.txtDateTo.Text       = now.ToString(this.dateFormat);
         this.ceDateFrom.StartDate = new DateTime?(DateTime.Now);
     }
     string[] formats = new string[7]
     {
         this.dateFormat,
         "MM/dd/yy",
         "MM/dd/yyyy",
         "dd/MM/yy",
         "dd/MM/yyyy",
         "yy-MM-dd",
         "yyyy-MM-dd"
     };
     //this.lblInfo.Text = "Between " + DateTime.ParseExact(this.txtDateFrom.Text, formats, (IFormatProvider) CultureInfo.InvariantCulture, DateTimeStyles.None).ToString("MMMM dd, yyyy") + " and " + DateTime.ParseExact(this.txtDateTo.Text, formats, (IFormatProvider) CultureInfo.InvariantCulture, DateTimeStyles.None).ToString("MMMM dd, yyyy");
     this.lblInfo.Text = "Between " + txtDateFrom.Text + " and " + txtDateTo.Text;
 }
 private void SetCompanyRecords(string companyID)
 {
     this.objMiscellaneousMasterDT = this.objMiscellaneousMasterBll.GetDataByCompanyID(int.Parse(companyID));
     if (this.objMiscellaneousMasterDT.Rows.Count > 0)
     {
         this.hfMiscellaneousID.Value        = this.objMiscellaneousMasterDT.Rows[0]["MiscellaneousID"].ToString();
         this.hfCompanyID.Value              = this.objMiscellaneousMasterDT.Rows[0]["CompanyID"].ToString();
         this.txtLines.Text                  = this.objMiscellaneousMasterDT.Rows[0]["LinesPerPage"].ToString();
         this.ddlDateFormat.SelectedValue    = this.objMiscellaneousMasterDT.Rows[0]["DateFormat"].ToString();
         this.chkDirectLink.Checked          = bool.Parse(this.objMiscellaneousMasterDT.Rows[0]["DirectLinks"].ToString());
         this.chkBranding.Checked            = bool.Parse(this.objMiscellaneousMasterDT.Rows[0]["DoyinGoBranding"].ToString());
         this.chkRequestReview.Checked       = bool.Parse(this.objMiscellaneousMasterDT.Rows[0]["RequestReviews"].ToString());
         this.txtLogoText.Text               = this.objMiscellaneousMasterDT.Rows[0]["TextBelowYourLogo"].ToString();
         this.chkSendAutomatically.Checked   = bool.Parse(this.objMiscellaneousMasterDT.Rows[0]["RecurringInvoices"].ToString());
         this.chkCreditAutomatically.Checked = bool.Parse(this.objMiscellaneousMasterDT.Rows[0]["CreditAutomatically"].ToString());
         this.ddlLineType.SelectedValue      = this.objMiscellaneousMasterDT.Rows[0]["DefaultColumnHeadings"].ToString();
         this.txtWelcomeClient.Text          = this.objMiscellaneousMasterDT.Rows[0]["WelcomeMessagesClient"].ToString();
         this.txtWelcomeStaff.Text           = this.objMiscellaneousMasterDT.Rows[0]["WelcomeMessagesStaff"].ToString();
         this.ddlDefaultClient.SelectedValue = this.objMiscellaneousMasterDT.Rows[0]["DefaultClientAccess"].ToString();
         this.ddlDefaultStaff.SelectedValue  = this.objMiscellaneousMasterDT.Rows[0]["DefaultStaffAccess"].ToString();
         this.txtTimeMinutes.Text            = this.objMiscellaneousMasterDT.Rows[0]["SupportTimeIncrementMinute"].ToString();
         this.txtTimeHours.Text              = this.objMiscellaneousMasterDT.Rows[0]["SupportTimeIncrementHours"].ToString();
     }
     else
     {
         this.objMiscellaneousMasterBll.AddMiscellaneous(int.Parse(companyID), 15, "MM/dd/yyyy", true, true, true, "", true, false, "Both", "", "", "None", "Read/Write", 30, 10);
         this.Response.Redirect("Miscellaneous.aspx");
     }
 }
 public virtual CloudAccountDA.MiscellaneousMasterDataTable GetData()
 {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     CloudAccountDA.MiscellaneousMasterDataTable dataTable = new CloudAccountDA.MiscellaneousMasterDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
 public virtual int Fill(CloudAccountDA.MiscellaneousMasterDataTable dataTable)
 {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     if (this.ClearBeforeFill)
     {
         dataTable.Clear();
     }
     return(this.Adapter.Fill(dataTable));
 }
 private void SetMiscValues(string companyID)
 {
     this.objMiscellaneousMasterDT = this.objMiscellaneousMasterBll.GetDataByCompanyID(int.Parse(companyID));
     if (this.objMiscellaneousMasterDT.Rows.Count <= 0)
     {
         return;
     }
     this.linePerPage        = int.Parse(this.objMiscellaneousMasterDT.Rows[0]["LinesPerPage"].ToString());
     this.gvProject.PageSize = this.linePerPage;
 }
예제 #7
0
 private void SetWelcomeMessage(string companyID)
 {
     this.objMiscellaneousMasterDT = this.objMiscellaneousMasterBll.GetDataByCompanyID(int.Parse(companyID));
     if (this.objMiscellaneousMasterDT.Rows.Count <= 0)
     {
         return;
     }
     this.lblClientWelcomeMsg.Text = this.objMiscellaneousMasterDT.Rows[0]["WelcomeMessagesClient"].ToString();
     this.welcomeDiv.Visible       = !string.IsNullOrEmpty(this.lblClientWelcomeMsg.Text);
 }
예제 #8
0
 private void SetMiscValues(string companyID)
 {
     this.objMiscellaneousMasterDT = this.objMiscellaneousMasterBll.GetDataByCompanyID(int.Parse(companyID));
     if (this.objMiscellaneousMasterDT.Rows.Count <= 0)
     {
         return;
     }
     this.dateFormat              = this.objMiscellaneousMasterDT.Rows[0]["DateFormat"].ToString();
     this.linePerPage             = int.Parse(this.objMiscellaneousMasterDT.Rows[0]["LinesPerPage"].ToString());
     this.gvEstimate.PageSize     = this.linePerPage;
     this.lblCompanyLogoText.Text = this.objMiscellaneousMasterDT.Rows[0]["TextBelowYourLogo"].ToString();
     this.brandingDiv.Visible     = (bool)this.objMiscellaneousMasterDT.Rows[0]["DoyinGoBranding"];
 }
 protected void btnRestore_Click(object sender, EventArgs e)
 {
     this.objMiscellaneousMasterDT = this.objMiscellaneousMasterBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value));
     if (this.objMiscellaneousMasterDT.Rows.Count > 0)
     {
         this.objMiscellaneousMasterBll.UpdateMiscellaneous(int.Parse(this.hfMiscellaneousID.Value), int.Parse(this.hfCompanyID.Value), 15, "MM/dd/yyyy", true, true, true, "", true, false, "Both", "", "", "None", "Read/Write", 30, 10);
     }
     else
     {
         this.objMiscellaneousMasterBll.AddMiscellaneous(int.Parse(this.hfCompanyID.Value), 15, "MM/dd/yyyy", true, true, true, "", true, false, "Both", "", "", "None", "Read/Write", 30, 10);
     }
     this.Session["saveMisc"] = (object)1;
     this.Response.Redirect("Miscellaneous.aspx");
 }
 public virtual CloudAccountDA.MiscellaneousMasterDataTable DeleteByCompanyID(int?CompanyID)
 {
     this.Adapter.SelectCommand = this.CommandCollection[1];
     if (CompanyID.HasValue)
     {
         this.Adapter.SelectCommand.Parameters[1].Value = CompanyID.Value;
     }
     else
     {
         this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value;
     }
     CloudAccountDA.MiscellaneousMasterDataTable dataTable = new CloudAccountDA.MiscellaneousMasterDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
 protected void btnSave_Click(object sender, EventArgs e)
 {
     this.objMiscellaneousMasterDT = this.objMiscellaneousMasterBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value));
     if (this.objMiscellaneousMasterDT.Rows.Count > 0)
     {
         int iLinesPerPage = 15;
         int iSupportTimeIncrementMinute = 30;
         int iSupportTimeIncrementHours  = 10;
         if (this.txtLines.Text.Trim().Length > 0)
         {
             iLinesPerPage = int.Parse(this.txtLines.Text.Trim());
         }
         if (this.txtTimeMinutes.Text.Trim().Length > 0)
         {
             iSupportTimeIncrementMinute = int.Parse(this.txtTimeMinutes.Text.Trim());
         }
         if (this.txtTimeHours.Text.Trim().Length > 0)
         {
             iSupportTimeIncrementHours = int.Parse(this.txtTimeHours.Text.Trim());
         }
         this.objMiscellaneousMasterBll.UpdateMiscellaneous(int.Parse(this.hfMiscellaneousID.Value), int.Parse(this.hfCompanyID.Value), iLinesPerPage, this.ddlDateFormat.SelectedItem.Value, this.chkDirectLink.Checked, this.chkBranding.Checked, this.chkRequestReview.Checked, this.txtLogoText.Text.Trim(), this.chkSendAutomatically.Checked, this.chkCreditAutomatically.Checked, this.ddlLineType.SelectedItem.Value, this.txtWelcomeClient.Text.Trim(), this.txtWelcomeStaff.Text.Trim(), this.ddlDefaultClient.SelectedItem.Value, this.ddlDefaultStaff.SelectedItem.Value, iSupportTimeIncrementMinute, iSupportTimeIncrementHours);
     }
     else
     {
         int iLinesPerPage = 15;
         int iSupportTimeIncrementMinute = 30;
         int iSupportTimeIncrementHours  = 10;
         if (this.txtLines.Text.Trim().Length > 0)
         {
             iLinesPerPage = int.Parse(this.txtLines.Text.Trim());
         }
         if (this.txtTimeMinutes.Text.Trim().Length > 0)
         {
             iSupportTimeIncrementMinute = int.Parse(this.txtTimeMinutes.Text.Trim());
         }
         if (this.txtTimeHours.Text.Trim().Length > 0)
         {
             iSupportTimeIncrementHours = int.Parse(this.txtTimeHours.Text.Trim());
         }
         this.objMiscellaneousMasterBll.AddMiscellaneous(int.Parse(this.hfCompanyID.Value), iLinesPerPage, this.ddlDateFormat.SelectedItem.Value, this.chkDirectLink.Checked, this.chkBranding.Checked, this.chkRequestReview.Checked, this.txtLogoText.Text.Trim(), this.chkSendAutomatically.Checked, this.chkCreditAutomatically.Checked, this.ddlLineType.SelectedItem.Value, this.txtWelcomeClient.Text.Trim(), this.txtWelcomeStaff.Text.Trim(), this.ddlDefaultClient.SelectedItem.Value, this.ddlDefaultStaff.SelectedItem.Value, iSupportTimeIncrementMinute, iSupportTimeIncrementHours);
     }
     this.Session["saveMisc"] = (object)1;
     this.Response.Redirect("Miscellaneous.aspx");
 }
예제 #12
0
 private void SetMiscValues(string companyID)
 {
     this.objMiscellaneousMasterDT = this.objMiscellaneousMasterBll.GetDataByCompanyID(int.Parse(companyID));
     if (this.objMiscellaneousMasterDT.Rows.Count > 0)
     {
         this.dateFormat           = this.objMiscellaneousMasterDT.Rows[0]["DateFormat"].ToString();
         this.linePerPage          = int.Parse(this.objMiscellaneousMasterDT.Rows[0]["LinesPerPage"].ToString());
         this.gvPayment.PageSize   = this.linePerPage;
         this.cePaymentDate.Format = this.dateFormat;
         this.ceDateFrom.Format    = this.dateFormat;
         this.ceDateTo.Format      = this.dateFormat;
         this.branding             = (bool)this.objMiscellaneousMasterDT.Rows[0]["DoyinGoBranding"] ? "none" : "block";
         this.directLink           = (bool)this.objMiscellaneousMasterDT.Rows[0]["DirectLinks"] ? "none" : "block";
     }
     this.objNewPaymentEmailTemplateDT = this.objNewPaymentEmailTemplateBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value), "other");
     if (this.objNewPaymentEmailTemplateDT.Rows.Count <= 0)
     {
         return;
     }
     this.chkEmail.Checked = bool.Parse(this.objNewPaymentEmailTemplateDT.Rows[0]["Enable"].ToString());
 }
 private void SetMiscValues(string companyId)
 {
     this.objCompanyMasterDT       = this.objCompanyMasterBll.GetDataByCompanyID(int.Parse(companyId));
     this.lblCompanyName.Text      = this.objCompanyMasterDT.Rows[0]["CompanyName"].ToString();
     this.objMiscellaneousMasterDT = this.objMiscellaneousMasterBll.GetDataByCompanyID(int.Parse(companyId));
     //if (this.objMiscellaneousMasterDT.Rows.Count <= 0)
     //  return;
     //this.dateFormat = this.objMiscellaneousMasterDT.Rows[0]["DateFormat"].ToString();
     //this.ceDate.Format = this.dateFormat;
     //string[] formats = new string[6]
     //{
     //  "MM/dd/yy",
     //  "MM/dd/yyyy",
     //  "dd/MM/yy",
     //  "dd/MM/yyyy",
     //  "yy-MM-dd",
     //  "yyyy-MM-dd"
     //};
     //      string str1 = this.txtDate.Text; //DateTime.ParseExact(this.txtDate.Text, formats, (IFormatProvider) CultureInfo.InvariantCulture, DateTimeStyles.None).ToString("yyyy-MM-dd");
     //      string str2 = this.txtDate.Text; // DateTime.ParseExact(this.txtDate.Text, formats, (IFormatProvider) CultureInfo.InvariantCulture, DateTimeStyles.None).ToString("MMMM dd, yyyy");
     //this.hfDate.Value = str1;
     this.lblDate.Text = txtDate.Text;
 }
        private void SetNewDefaultValues()
        {
            MembershipUser user = Membership.GetUser();

            if (user != null)
            {
                string str = user.ToString();
                if (Roles.IsUserInRole(str, "Admin"))
                {
                    this.objCompanyLoginMasterDT = this.objCompanyLoginMasterBll.GetDataByCompanyLoginName(str);
                    if (this.objCompanyLoginMasterDT.Rows.Count > 0)
                    {
                        this.hfCompanyID.Value = this.objCompanyLoginMasterDT.Rows[0]["CompanyID"].ToString();
                    }
                }
                else if (Roles.IsUserInRole(str, "Employee"))
                {
                    this.objStaffMasterDT = this.objStaffMasterBll.GetDataByStaffUserName(str);
                    if (this.objStaffMasterDT.Rows.Count > 0)
                    {
                        this.hfCompanyID.Value = this.objStaffMasterDT.Rows[0]["CompanyID"].ToString();
                    }
                }
            }
            int num = 30;

            this.objFreePackageSettingsDT = this.objFreePackageSettingsBll.GetAllDetail();
            if (this.objFreePackageSettingsDT.Rows.Count > 0)
            {
                num = int.Parse(this.objFreePackageSettingsDT.Rows[0]["FreePackageDays"].ToString());
            }
            this.objCompanyPackageMasterDT = this.objCompanyPackageMasterBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value));
            if (this.objCompanyPackageMasterDT.Rows.Count == 0)
            {
                this.objCompanyPackageMasterBll.AddCompanyPackage(int.Parse(this.hfCompanyID.Value), 0, new DateTime?(DateTime.Now), new DateTime?(DateTime.Now.AddDays((double)num)), "FREE", new Decimal?(new Decimal(0)), "NONE", new DateTime?(), new DateTime?(DateTime.Now), true);
            }
            this.objAdminPermissionMasterDT = this.objAdminPermissionMasterBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value));
            if (this.objAdminPermissionMasterDT.Rows.Count == 0)
            {
                this.objAdminPermissionMasterBll.AddAdminPermission(int.Parse(this.hfCompanyID.Value), true, true, true, false, false);
            }
            this.objMiscellaneousMasterDT = this.objMiscellaneousMasterBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value));
            if (this.objMiscellaneousMasterDT.Rows.Count == 0)
            {
                this.objMiscellaneousMasterBll.AddMiscellaneous(int.Parse(this.hfCompanyID.Value), 15, "MM/dd/yyyy", true, true, true, "", true, false, "Both", "", "", "None", "Read/Write", 30, 10);
            }
            this.objClientPermissionMasterDT = this.objClientPermissionMasterBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value));
            if (this.objClientPermissionMasterDT.Rows.Count == 0)
            {
                this.objClientPermissionMasterBll.AddClientPermission(int.Parse(this.hfCompanyID.Value), true, true, true, false, false, true, true);
            }
            this.objStaffPermissionMasterDT = this.objStaffPermissionMasterBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value));
            if (this.objStaffPermissionMasterDT.Rows.Count == 0)
            {
                this.objStaffPermissionMasterBll.AddStaffPermission(int.Parse(this.hfCompanyID.Value), true, true, true, true, true, false, false, true, true, true, true, true);
            }
            this.objTemplateSettingsDT = this.objTemplateSettingsBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value));
            if (this.objTemplateSettingsDT.Rows.Count == 0)
            {
                this.objTemplateSettingsBll.AddTemplateSettings(int.Parse(this.hfCompanyID.Value), 1, "Invoice", "Estimate", "Credit", true);
            }
            this.objEmailNotificationsDT = this.objEmailNotificationsBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value));
            if (this.objEmailNotificationsDT.Rows.Count == 0)
            {
                this.objEmailNotificationsBll.AddEmailNotifications(int.Parse(this.hfCompanyID.Value), true, false, false, false);
            }
            this.objSMTPSettingsDT = this.objSMTPSettingsBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value));
            if (this.objSMTPSettingsDT.Rows.Count == 0)
            {
                this.objSMTPSettingsBll.AddSMTPSettings(int.Parse(this.hfCompanyID.Value), Common.CommonHandler.BaseMailFrom, Common.CommonHandler.BaseHost, Convert.ToInt32(Common.CommonHandler.BasePort), Common.CommonHandler.BaseEnableSSL, Common.CommonHandler.BasePassword, Common.CommonHandler.BaseUserName, "Best regards,<br />##companyName## (##companyEmail##)");
            }
            this.objNewClientEmailTemplateDT = this.objNewClientEmailTemplateBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value));
            if (this.objNewClientEmailTemplateDT.Rows.Count == 0)
            {
                this.objNewClientEmailTemplateBll.AddClientTemplate(int.Parse(this.hfCompanyID.Value), "##companyName## is now invoicing you with Bill Transact", new StringBuilder("Welcome to ##companyName##'s secure online services.  An account has been created for you.<br />To securely access your account, go to:<br />##login link##<br />Login using the following username and password:<br />Username: ##username##<br />Password: ##password##<br />").ToString());
            }
            this.objNewCreditEmailTemplateDT = this.objNewCreditEmailTemplateBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value));
            if (this.objNewCreditEmailTemplateDT.Rows.Count == 0)
            {
                this.objNewCreditEmailTemplateBll.AddCreditTemplate(int.Parse(this.hfCompanyID.Value), "New Credit ##creditNumber## from ##companyName## , sent using Bill Transact", new StringBuilder("You have received credit in the amount of ##paymentAmt##. To view it and download a PDF copy for your records, click the link below.<br /><br />##creditLink##<br />").ToString());
            }
            this.objNewEstimateEmailTemplateDT = this.objNewEstimateEmailTemplateBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value));
            if (this.objNewEstimateEmailTemplateDT.Rows.Count == 0)
            {
                this.objNewEstimateEmailTemplateBll.AddEstimateTemplate(int.Parse(this.hfCompanyID.Value), "New Estimate ##estimateNumber## from ##companyName## , sent using Bill Transact", new StringBuilder("To access your estimate from ##companyName## for ##paymentAmt##, go to:<br /><br /> ##estimateLink##<br />").ToString());
            }
            this.objNewInvoiceEmailTemplateDT = this.objNewInvoiceEmailTemplateBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value));
            if (this.objNewInvoiceEmailTemplateDT.Rows.Count == 0)
            {
                this.objNewInvoiceEmailTemplateBll.AddInvoiceTemplate(int.Parse(this.hfCompanyID.Value), "New invoice ##invoiceNumber## from ##companyName## , sent using Bill Transact", new StringBuilder("To view your invoice from ##companyName## for ##invoiceAmt##, or to download a PDF copy for your records, click the link below:<br /><br />##someLink##<br /><br />").ToString());
            }
            this.objNewStaffEmailTemplateDT = this.objNewStaffEmailTemplateBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value));
            if (this.objNewStaffEmailTemplateDT.Rows.Count == 0)
            {
                this.objNewStaffEmailTemplateBll.AddStaffTemplate(int.Parse(this.hfCompanyID.Value), "##companyName## invites you to track time and expenses in Bill Transact", new StringBuilder("You are now part of ##companyName##'s team.<br />Click here to log in to your account:<br />##login link##<br /><br />Username: ##username##<br />Password: ##password##<br />").ToString());
            }
            this.objNewPaymentEmailTemplateDT = this.objNewPaymentEmailTemplateBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value), "online");
            if (this.objNewPaymentEmailTemplateDT.Rows.Count == 0)
            {
                this.objNewPaymentEmailTemplateBll.AddPaymentTemplate(int.Parse(this.hfCompanyID.Value), "online", true, "##companyName## has received your payment for invoice ##invoiceNumber## in Bill Transact", new StringBuilder("Thank you for your business.<br />We have received your payment in the amount of ##payment amount## for invoice ##invoice number##.<br />To view the paid invoice or download a PDF copy for your records, click the link below:<br /><br />##someLink##<br />").ToString());
            }
            this.objNewPaymentEmailTemplateDT = this.objNewPaymentEmailTemplateBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value), "other");
            if (this.objNewPaymentEmailTemplateDT.Rows.Count == 0)
            {
                this.objNewPaymentEmailTemplateBll.AddPaymentTemplate(int.Parse(this.hfCompanyID.Value), "other", false, "##companyName## has received your payment for invoice ##invoiceNumber## in Bill Transact", new StringBuilder("Thank you for your business.<br />We have received your payment in the amount of ##payment amount## for invoice ##invoice number##.<br />To view the paid invoice or download a PDF copy for your records, click the link below:<br /><br />##someLink##<br />").ToString());
            }
            this.objLatePaymentReminderTemplateDT = this.objLatePaymentReminderTemplateBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value), 1);
            if (this.objLatePaymentReminderTemplateDT.Rows.Count == 0)
            {
                this.objLatePaymentReminderTemplateBll.AddLatePaymentReminder(int.Parse(this.hfCompanyID.Value), 1, false, 30, "Your payment for invoice ##invoiceNumber## is overdue in Bill Transact", new StringBuilder("Your invoice is now 30 days overdue.  Please pay your invoice.<br /><br />To access your invoice from ##companyName##, go to:<br /><br />##someLink##<br />").ToString());
            }
            this.objLatePaymentReminderTemplateDT = this.objLatePaymentReminderTemplateBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value), 2);
            if (this.objLatePaymentReminderTemplateDT.Rows.Count == 0)
            {
                this.objLatePaymentReminderTemplateBll.AddLatePaymentReminder(int.Parse(this.hfCompanyID.Value), 2, false, 60, "Your payment for invoice ##invoiceNumber## is overdue in Bill Transact", new StringBuilder("Your invoice is now 60 days overdue.  Please pay your invoice.<br /><br />To access your invoice from ##companyName##, go to:<br /><br />##someLink##<br />").ToString());
            }
            this.objLatePaymentReminderTemplateDT = this.objLatePaymentReminderTemplateBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value), 3);
            if (this.objLatePaymentReminderTemplateDT.Rows.Count == 0)
            {
                this.objLatePaymentReminderTemplateBll.AddLatePaymentReminder(int.Parse(this.hfCompanyID.Value), 3, false, 90, "Your payment for invoice ##invoiceNumber## is overdue in Bill Transact", new StringBuilder("Your invoice is now 90 days overdue.  Please pay your invoice.<br /><br />To access your invoice from ##companyName##, go to:<br /><br />##someLink##<br />").ToString());
            }
            this.objAutoBillEmailTemplateDT = this.objAutoBillEmailTemplateBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value), "Auto-bill");
            if (this.objAutoBillEmailTemplateDT.Rows.Count == 0)
            {
                this.objAutoBillEmailTemplateBll.AddAutoBillEmail(int.Parse(this.hfCompanyID.Value), "Auto-bill", true, "New recurring invoice ##invoiceNumber## from ##companyName##, sent using Bill Transact", this.strBodyBill.ToString());
            }
            this.objAutoBillEmailTemplateDT = this.objAutoBillEmailTemplateBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value), "Auto-paid");
            if (this.objAutoBillEmailTemplateDT.Rows.Count == 0)
            {
                this.objAutoBillEmailTemplateBll.AddAutoBillEmail(int.Parse(this.hfCompanyID.Value), "Auto-paid", true, "New recurring invoice ##invoiceNumber## from ##companyName##, sent using Bill Transact", this.strBodyPaid.ToString());
            }
            this.objAutoBillEmailTemplateDT = this.objAutoBillEmailTemplateBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value), "Card Expired");
            if (this.objAutoBillEmailTemplateDT.Rows.Count == 0)
            {
                this.objAutoBillEmailTemplateBll.AddAutoBillEmail(int.Parse(this.hfCompanyID.Value), "Card Expired", true, "Action required: Your credit card on file with ##companyName## is expiring soon in Bill Transact", this.strBodyExpired.ToString());
            }
            this.objAutoBillEmailTemplateDT = this.objAutoBillEmailTemplateBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value), "Card Failed");
            if (this.objAutoBillEmailTemplateDT.Rows.Count != 0)
            {
                return;
            }
            this.objAutoBillEmailTemplateBll.AddAutoBillEmail(int.Parse(this.hfCompanyID.Value), "Card Failed", false, "Action required: Your credit card on file for invoice ##invoiceNumber## from ##companyName## needs updating in Bill Transact", this.strBodyFailed.ToString());
        }
 public virtual int Update(CloudAccountDA.MiscellaneousMasterDataTable dataTable)
 {
     return(this.Adapter.Update(dataTable));
 }