protected void btnSave_Click(object sender, EventArgs e)
 {
     this.objAdminPermissionMasterDT = this.objAdminPermissionMasterBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value));
     if (this.objAdminPermissionMasterDT.Rows.Count > 0)
     {
         this.objAdminPermissionMasterBll.UpdateAdminPermission(int.Parse(this.hfAdminPerID.Value), int.Parse(this.hfCompanyID.Value), this.chkAdminEstimate.Checked, this.chkAdminExpense.Checked, this.chkAdminTimesheet.Checked, this.chkAdminSupport.Checked, this.chkAdminDocument.Checked);
     }
     else
     {
         this.objAdminPermissionMasterBll.AddAdminPermission(int.Parse(this.hfCompanyID.Value), true, true, true, false, false);
     }
     this.objStaffPermissionMasterDT = this.objStaffPermissionMasterBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value));
     if (this.objStaffPermissionMasterDT.Rows.Count > 0)
     {
         this.objStaffPermissionMasterBll.UpdateStaffPermission(int.Parse(this.hfStaffPerID.Value), int.Parse(this.hfCompanyID.Value), this.chkStaffPeople.Checked, this.chkStaffInvoice.Checked, this.chkStaffEstimate.Checked, this.chkStaffExpense.Checked, this.chkStaffTimesheet.Checked, this.chkStaffSupport.Checked, this.chkStaffDocument.Checked, this.chkStaffReport.Checked, this.chkStaffProjectAccess.Checked, this.chkStaffSendInv.Checked, this.chkStaffClientManagement.Checked, this.chkStaffTicketAdmin.Checked);
     }
     else
     {
         this.objStaffPermissionMasterBll.AddStaffPermission(int.Parse(this.hfCompanyID.Value), true, true, true, true, true, false, false, true, true, true, true, true);
     }
     this.objClientPermissionMasterDT = this.objClientPermissionMasterBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value));
     if (this.objClientPermissionMasterDT.Rows.Count > 0)
     {
         this.objClientPermissionMasterBll.UpdateClientPermission(int.Parse(this.hfClientPerID.Value), int.Parse(this.hfCompanyID.Value), this.chkClientInvoice.Checked, this.chkClientEstimate.Checked, this.chkClientProject.Checked, this.chkClientSupport.Checked, this.chkClientDocument.Checked, this.chkClientDisputeInvoices.Checked, this.chkClientDocumentAdmin.Checked);
     }
     else
     {
         this.objClientPermissionMasterBll.AddClientPermission(int.Parse(this.hfCompanyID.Value), true, true, true, false, false, true, true);
     }
     this.Session["savePer"] = (object)1;
     this.Response.Redirect("CompanyUserPermissions.aspx");
 }
 public virtual CloudAccountDA.AdminPermissionMasterDataTable GetData()
 {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     CloudAccountDA.AdminPermissionMasterDataTable dataTable = new CloudAccountDA.AdminPermissionMasterDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
 public virtual int Fill(CloudAccountDA.AdminPermissionMasterDataTable dataTable)
 {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     if (this.ClearBeforeFill)
     {
         dataTable.Clear();
     }
     return(this.Adapter.Fill(dataTable));
 }
 public virtual CloudAccountDA.AdminPermissionMasterDataTable 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.AdminPermissionMasterDataTable dataTable = new CloudAccountDA.AdminPermissionMasterDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
        private void SetCompanyPermission(string companyID)
        {
            int num = 0;

            this.objAdminPermissionMasterDT = this.objAdminPermissionMasterBll.GetDataByCompanyID(int.Parse(companyID));
            if (this.objAdminPermissionMasterDT.Rows.Count > 0)
            {
                this.hfAdminPerID.Value       = this.objAdminPermissionMasterDT.Rows[0]["AdminPermissionID"].ToString();
                this.chkAdminEstimate.Checked = bool.Parse(this.objAdminPermissionMasterDT.Rows[0]["Estimate"].ToString());
                if (this.chkAdminEstimate.Checked)
                {
                    this.liAdminEstimate.Attributes.Add("class", "enabled");
                }
                this.chkAdminExpense.Checked = bool.Parse(this.objAdminPermissionMasterDT.Rows[0]["Expenses"].ToString());
                if (this.chkAdminExpense.Checked)
                {
                    this.liAdminExpense.Attributes.Add("class", "enabled");
                }
                this.chkAdminTimesheet.Checked = bool.Parse(this.objAdminPermissionMasterDT.Rows[0]["TimeTracking"].ToString());
                if (this.chkAdminTimesheet.Checked)
                {
                    this.liAdminTimesheet.Attributes.Add("class", "enabled");
                }
                this.chkAdminSupport.Checked = bool.Parse(this.objAdminPermissionMasterDT.Rows[0]["Support"].ToString());
                if (this.chkAdminSupport.Checked)
                {
                    this.liAdminSupport.Attributes.Add("class", "enabled");
                }
                this.chkAdminDocument.Checked = bool.Parse(this.objAdminPermissionMasterDT.Rows[0]["Documents"].ToString());
                if (this.chkAdminDocument.Checked)
                {
                    this.liAdminDocument.Attributes.Add("class", "enabled");
                }
            }
            else
            {
                ++num;
                this.objAdminPermissionMasterBll.AddAdminPermission(int.Parse(companyID), true, true, true, false, false);
            }
            this.objStaffPermissionMasterDT = this.objStaffPermissionMasterBll.GetDataByCompanyID(int.Parse(companyID));
            if (this.objStaffPermissionMasterDT.Rows.Count > 0)
            {
                this.hfStaffPerID.Value     = this.objStaffPermissionMasterDT.Rows[0]["StaffPermissionID"].ToString();
                this.chkStaffPeople.Checked = bool.Parse(this.objStaffPermissionMasterDT.Rows[0]["People"].ToString());
                if (this.chkStaffPeople.Checked)
                {
                    this.liStaffPeople.Attributes.Add("class", "enabled");
                }
                this.chkStaffInvoice.Checked = bool.Parse(this.objStaffPermissionMasterDT.Rows[0]["Invoice"].ToString());
                if (this.chkStaffInvoice.Checked)
                {
                    this.liStaffInvoice.Attributes.Add("class", "enabled");
                }
                this.chkStaffEstimate.Checked = bool.Parse(this.objStaffPermissionMasterDT.Rows[0]["Estimate"].ToString());
                if (this.chkStaffEstimate.Checked)
                {
                    this.liStaffEstimate.Attributes.Add("class", "enabled");
                }
                this.chkStaffExpense.Checked = bool.Parse(this.objStaffPermissionMasterDT.Rows[0]["Expenses"].ToString());
                if (this.chkStaffExpense.Checked)
                {
                    this.liStaffExpense.Attributes.Add("class", "enabled");
                }
                this.chkStaffTimesheet.Checked = bool.Parse(this.objStaffPermissionMasterDT.Rows[0]["TimeTracking"].ToString());
                if (this.chkStaffTimesheet.Checked)
                {
                    this.liStaffTimesheet.Attributes.Add("class", "enabled");
                }
                this.chkStaffSupport.Checked = bool.Parse(this.objStaffPermissionMasterDT.Rows[0]["Support"].ToString());
                if (this.chkStaffSupport.Checked)
                {
                    this.liStaffSupport.Attributes.Add("class", "enabled");
                }
                this.chkStaffDocument.Checked = bool.Parse(this.objStaffPermissionMasterDT.Rows[0]["Documents"].ToString());
                if (this.chkStaffDocument.Checked)
                {
                    this.liStaffDocument.Attributes.Add("class", "enabled");
                }
                this.chkStaffReport.Checked = bool.Parse(this.objStaffPermissionMasterDT.Rows[0]["Reports"].ToString());
                if (this.chkStaffReport.Checked)
                {
                    this.liStaffReport.Attributes.Add("class", "enabled");
                }
                this.chkStaffProjectAccess.Checked    = bool.Parse(this.objStaffPermissionMasterDT.Rows[0]["ProjectAccess"].ToString());
                this.chkStaffSendInv.Checked          = bool.Parse(this.objStaffPermissionMasterDT.Rows[0]["SendInvEstCre"].ToString());
                this.chkStaffClientManagement.Checked = bool.Parse(this.objStaffPermissionMasterDT.Rows[0]["ClientManagement"].ToString());
                this.chkStaffTicketAdmin.Checked      = bool.Parse(this.objStaffPermissionMasterDT.Rows[0]["TicketAdministration"].ToString());
            }
            else
            {
                ++num;
                this.objStaffPermissionMasterBll.AddStaffPermission(int.Parse(companyID), true, true, true, true, true, false, false, true, true, true, true, true);
            }
            this.objClientPermissionMasterDT = this.objClientPermissionMasterBll.GetDataByCompanyID(int.Parse(companyID));
            if (this.objClientPermissionMasterDT.Rows.Count > 0)
            {
                this.hfClientPerID.Value       = this.objClientPermissionMasterDT.Rows[0]["ClientPermissionID"].ToString();
                this.chkClientEstimate.Checked = bool.Parse(this.objClientPermissionMasterDT.Rows[0]["Estimate"].ToString());
                if (this.chkClientEstimate.Checked)
                {
                    this.liClientEstimate.Attributes.Add("class", "enabled");
                }
                this.chkClientInvoice.Checked = bool.Parse(this.objClientPermissionMasterDT.Rows[0]["Invoice"].ToString());
                if (this.chkClientInvoice.Checked)
                {
                    this.liClientInvoice.Attributes.Add("class", "enabled");
                }
                this.chkClientProject.Checked = bool.Parse(this.objClientPermissionMasterDT.Rows[0]["Projects"].ToString());
                if (this.chkClientProject.Checked)
                {
                    this.liClientProject.Attributes.Add("class", "enabled");
                }
                this.chkClientSupport.Checked = bool.Parse(this.objClientPermissionMasterDT.Rows[0]["Support"].ToString());
                if (this.chkClientSupport.Checked)
                {
                    this.liClientSupport.Attributes.Add("class", "enabled");
                }
                this.chkClientDocument.Checked = bool.Parse(this.objClientPermissionMasterDT.Rows[0]["Documents"].ToString());
                if (this.chkClientDocument.Checked)
                {
                    this.liClientDocument.Attributes.Add("class", "enabled");
                }
                this.chkClientDisputeInvoices.Checked = bool.Parse(this.objClientPermissionMasterDT.Rows[0]["DisputeInvoices"].ToString());
                this.chkClientDocumentAdmin.Checked   = bool.Parse(this.objClientPermissionMasterDT.Rows[0]["DocumentAdministration"].ToString());
            }
            else
            {
                ++num;
                this.objClientPermissionMasterBll.AddClientPermission(int.Parse(companyID), true, true, true, false, false, true, true);
            }
            if (num <= 0)
            {
                return;
            }
            this.Response.Redirect("CompanyUserPermissions.aspx");
        }
        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());
        }
Ejemplo n.º 7
0
 private void MenuAdmin()
 {
     this.uploadLogo.Visible     = true;
     this.account.Visible        = true;
     this.setting.Visible        = true;
     this.staffProfile.Visible   = false;
     this.help.Visible           = true;
     this.footerRow.Visible      = true;
     this.home.Visible           = true;
     this.userManagement.Visible = true;
     this.invoice.Visible        = true;
     this.reports.Visible        = true;
     if (!string.IsNullOrEmpty(this.hfCompanyID.Value))
     {
         this.objAdminPermissionMasterDT = this.objAdminPermissionMasterBll.GetDataByCompanyID(int.Parse(this.hfCompanyID.Value));
         if (this.objAdminPermissionMasterDT.Rows.Count > 0)
         {
             this.Estimate.Visible     = bool.Parse(this.objAdminPermissionMasterDT.Rows[0]["Estimate"].ToString());
             this.expenseMenu.Visible  = bool.Parse(this.objAdminPermissionMasterDT.Rows[0]["Expenses"].ToString());
             this.timeTracking.Visible = bool.Parse(this.objAdminPermissionMasterDT.Rows[0]["TimeTracking"].ToString());
             if (bool.Parse(this.objAdminPermissionMasterDT.Rows[0]["Documents"].ToString()) || bool.Parse(this.objAdminPermissionMasterDT.Rows[0]["Support"].ToString()))
             {
                 this.moreMenu.Visible = true;
             }
             else
             {
                 this.moreMenu.Visible = false;
             }
         }
         else
         {
             this.Estimate.Visible     = true;
             this.expenseMenu.Visible  = true;
             this.timeTracking.Visible = true;
             this.moreMenu.Visible     = true;
         }
     }
     else
     {
         this.Estimate.Visible     = true;
         this.expenseMenu.Visible  = true;
         this.timeTracking.Visible = true;
         this.moreMenu.Visible     = true;
     }
     this.mainHome.Visible         = true;
     this.referDoyingo.Visible     = true;
     this.pricing.Visible          = true;
     this.buyStamp.Visible         = false;
     this.doyinGoSupport.Visible   = true;
     this.client.Visible           = true;
     this.staffContractor.Visible  = true;
     this.accountant.Visible       = true;
     this.assignClient.Visible     = true;
     this.sentEmail.Visible        = true;
     this.newInvoice.Visible       = true;
     this.recurring.Visible        = true;
     this.receivedInvoice.Visible  = true;
     this.payments.Visible         = true;
     this.credits.Visible          = true;
     this.item.Visible             = true;
     this.newEstimate.Visible      = true;
     this.receivedEstimate.Visible = true;
     this.expense.Visible          = true;
     this.importExpense.Visible    = true;
     this.timeSheet.Visible        = true;
     this.projects.Visible         = true;
     this.tasks.Visible            = true;
     this.teamTimeSheet.Visible    = true;
     this.genrateInv.Visible       = true;
 }
 public virtual int Update(CloudAccountDA.AdminPermissionMasterDataTable dataTable)
 {
     return(this.Adapter.Update(dataTable));
 }