Exemplo n.º 1
0
        public void BindAddress()
        {
            ApplicationSettingsModel model = client.GetApplictionByParlourID(ParlourId);

            lbladd1.Text    = model.BusinessAddressLine1.ToString();
            lbladd2.Text    = model.BusinessAddressLine2.ToString();
            lbladd3.Text    = model.BusinessAddressLine3.ToString();
            lbladd4.Text    = model.BusinessPostalCode.ToString();
            lblfpsnub.Text  = "FPS Number: " + model.FSBNumber;
            lblTelCell.Text = model.ManageTelNumber.ToString() + " | " + model.ManageCellNumber.ToString();
        }
Exemplo n.º 2
0
        public void GetCompDetails()
        {
            ApplicationSettingsModel objApp = client.GetApplictionByParlourID(ParlourId);

            txtcompanyRules.Text = objApp.ApplicationName + Environment.NewLine + objApp.BusinessAddressLine1 + "," + Environment.NewLine + objApp.BusinessAddressLine2 + "," + Environment.NewLine + objApp.BusinessAddressLine3 + "," + Environment.NewLine + objApp.BusinessAddressLine4 + Environment.NewLine + objApp.BusinessPostalCode;
            ApplicationTnCModel ModelTnc;

            ModelTnc = client.SelectApplicationTermsAndCondition(ParlourId);
            if (ModelTnc != null)
            {
                txtTnc.Text = ModelTnc.TermsAndCondition;
            }
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lblMessage.Visible = false;
            if (!Page.IsPostBack)
            {
                ddlPageSize.SelectedIndex = ddlPageSize.Items.IndexOf(ddlPageSize.Items.FindByValue(PageSize.ToString()));
                BindSecureGroupList();
                if (Request.QueryString["CompanyParlourID"] != null)
                {
                    CompanyParlourId = new Guid(Request.QueryString["CompanyParlourID"]);
                    ApplicationSettingsModel modelcom;
                    modelcom = _client.GetApplictionByParlourID(CompanyParlourId);
                    if (modelcom != null)
                    {
                        if (Request.QueryString["NewId"] != null)
                        {
                            ClientScript.RegisterStartupScript(GetType(), "Javascript",
                                                               "javascript:alert(" + modelcom.ApplicationName +
                                                               "'Company Details successfully saved. Please Add Company User'); ", true);
                        }
                        else
                        {
                            ClientScript.RegisterStartupScript(GetType(), "Javascript",
                                                               "javascript:alert('Add " + modelcom.ApplicationName + " Company New User'); ", true);
                        }
                    }
                    BindCustomDetails(CompanyParlourId);
                    BindBranches(CompanyParlourId);
                }
                else
                {
                    CompanyParlourId = ParlourId;
                    BindCustomDetails(ParlourId);
                    BindBranches(ParlourId);
                }
                BindUserList();
            }
            SecureUserGroupsModel model;

            model = _client.GetUserAccessByID(UserID, ParlourId);
            if (model == null)
            {
                foreach (ListItem lst in chkSecurityGroup.Items)
                {
                    if (Convert.ToInt32(lst.Value) == 3 || Convert.ToInt32(lst.Value) == 4 || Convert.ToInt32(lst.Value) == 12)
                    {
                        lst.Enabled = false;
                    }
                }
            }
        }
Exemplo n.º 4
0
        public void BindDashbordDetails()
        {
            ApplicationSettingsModel modelCompany;

            modelCompany = client.GetApplictionByParlourID(ABP.ParlourId);
            if (modelCompany != null)
            {
                if (modelCompany.ApplicationLogo != null)
                {
                    string base64String = Convert.ToBase64String(modelCompany.ApplicationLogo, 0, modelCompany.ApplicationLogo.Length);
                    Image1.ImageUrl = "data:image/png;base64," + base64String;
                }
                else
                {
                    Image1.ImageUrl = string.Empty;
                }
            }
        }
Exemplo n.º 5
0
        public List <ApplicationSettingsModel> GetImage()
        {
            List <ApplicationSettingsModel> plist = new List <ApplicationSettingsModel>();

            ApplicationSettingsModel modelCompany;

            modelCompany = client.GetApplictionByParlourID(ParlourId);
            string base64String = Convert.ToBase64String(modelCompany.ApplicationLogo, 0, modelCompany.ApplicationLogo.Length);
            var    Imgs         = "data:image/png;base64," + base64String;

            foreach (var Img in Imgs)
            {
                plist.Add(new ApplicationSettingsModel {
                    parlourid = modelCompany.parlourid, ApplicationLogo = modelCompany.ApplicationLogo
                });
            }
            return(plist);
        }
Exemplo n.º 6
0
        public void BindCompany()
        {
            ApplicationSettingsModel modelCompany;

            modelCompany = client.GetApplictionByParlourID(ParlourId);
            if (modelCompany != null)
            {
                lblAppliName.Text = modelCompany.ApplicationName.ToString();
                lblAdd1.Text      = modelCompany.BusinessAddressLine1.ToString();
                lblAdd2.Text      = modelCompany.BusinessAddressLine2.ToString();
                lblAdd3.Text      = modelCompany.BusinessAddressLine3.ToString();
                lblAdd4.Text      = modelCompany.BusinessAddressLine4.ToString();
                lblCode.Text      = modelCompany.BusinessPostalCode.ToString();
                lblEmail.Text     = modelCompany.ManageEmail.ToString();
                lblVat.Text       = modelCompany.VatNo.ToString();
                lblSlogan.Text    = modelCompany.ManageSlogan.ToString();

                lblTelephone.Text  = modelCompany.OwnerTelNumber;
                lblCellNumber.Text = modelCompany.OwnerCellNumber;

                lblContactEmail.Text = modelCompany.OwnerEmail;

                BankingDetailSending Modelbank = client.GetBankingByID(modelCompany.parlourid);
                if (Modelbank != null)
                {
                    StringBuilder sb = new StringBuilder();
                    sb.AppendFormat("<b>Account Holder &#09;:</b>{0}<br/>", Modelbank.AccountHolder);
                    sb.AppendFormat("<b>Bank name &#09;:</b>{0}<br/>", Modelbank.Bankname);
                    sb.AppendFormat("<b>Account Number &#09;:</b>{0}<br/>", Modelbank.AccountNumber);
                    sb.AppendFormat("<b>Account type &#09;:</b>{0}<br/>", Modelbank.Accounttype);
                    sb.AppendFormat("<b>Branch &#09;:</b>{0}<br/>", Modelbank.Branch);
                    sb.AppendFormat("<b>Branch code &#09;:</b>{0}<br/>", Modelbank.Branchcode);
                    lblBankDetails.Text = sb.ToString();
                }

                if (modelCompany.ApplicationLogo != null)
                {
                    string base64String = Convert.ToBase64String(modelCompany.ApplicationLogo, 0, modelCompany.ApplicationLogo.Length);
                    ImagePreview.ImageUrl = "data:image/png;base64," + base64String;
                }
                else
                {
                    ImagePreview.ImageUrl = string.Empty;
                }
                ApplicationTnCModel ModelTnc;
                ModelTnc = client.SelectApplicationTermsAndCondition(modelCompany.parlourid);
                if (ModelTnc != null)
                {
                    if (QuotationID != 0 && ParlourId != Guid.Empty)
                    {
                        lblTNC.Text = ModelTnc.TermsAndCondition;
                    }
                    else if (FID != 0 && ParlourId != Guid.Empty)
                    {
                        lblTNC.Text = ModelTnc.TermsAndConditionFuneral;
                    }
                    else if (TBID != 0 && ParlourId != Guid.Empty)
                    {
                        lblTNC.Text = ModelTnc.TermsAndConditionTombstone;
                    }
                }
            }
        }
Exemplo n.º 7
0
        public void BindApplicationbyParlour()
        {
            PaymentHistory.Visible = false;
            ApplicationSettingsModel model;

            model = client.GetApplictionByParlourID(ParlourId);
            if (model != null)
            {
                ApplicationID              = model.pkiApplicationID;
                txtCompanyName.Text        = model.ApplicationName;
                txtownFirstName.Text       = model.OwnerFirstName;
                txtownLastName.Text        = model.OwnerSurname;
                txtownTelephoneNumber.Text = model.OwnerTelNumber;
                txtOwnersCellphone.Text    = model.OwnerCellNumber;
                txtTelePhone.Text          = model.ManageTelNumber;
                txtCellphone.Text          = model.ManageCellNumber;
                txtline1.Text              = model.BusinessAddressLine1;
                txtline2.Text              = model.BusinessAddressLine2;
                txtline3.Text              = model.BusinessAddressLine3;
                txtline4.Text              = model.BusinessAddressLine4;
                txtpostalcode.Text         = model.BusinessPostalCode;
                txtFsbNumber.Text          = model.FSBNumber;
                txtRegistrationNumber.Text = model.RegistrationNumber;
                txtCompanySlogan.Text      = model.ManageSlogan;
                txtEmail.Text              = model.ManageEmail;
                txtFaxNumber.Text          = model.ManageFaxNumber;
                txtOwnersEmail.Text        = model.OwnerEmail;
                txtcompanyRules.Text       = model.ApplicationRules;
                txtVatNo.Text              = model.VatNo;


                if (model.ApplicationLogo != null)
                {
                    string base64String = Convert.ToBase64String(model.ApplicationLogo, 0, model.ApplicationLogo.Length);
                    ImagePreview.ImageUrl = "data:image/png;base64," + base64String;
                }
                else
                {
                    ImagePreview.ImageUrl = string.Empty;
                }


                smsSendingGroupModel[] modelS = client.EditsmsGroupbyID(ApplicationID);
                foreach (smsSendingGroupModel lstModel in modelS)
                {
                    foreach (ListItem lst in chksmsGroup.Items)
                    {
                        if (Convert.ToInt32(lst.Value) == lstModel.fkismstempletID)
                        {
                            lst.Selected = true;
                        }
                    }
                }



                BankingDetailSending Modelbank;
                Modelbank = client.GetBankingByID(model.parlourid);
                if (Modelbank != null)
                {
                    txtaccountholder.Text = Modelbank.AccountHolder;
                    txtbankname.Text      = Modelbank.Bankname;
                    txtaccountnumber.Text = Modelbank.AccountNumber;
                    txtaccounttype.Text   = Modelbank.Accounttype;
                    txtbranch.Text        = Modelbank.Branch;
                    txtbranchcode.Text    = Modelbank.Branchcode;
                }

                ApplicationTnCModel ModelTnc;
                ModelTnc = client.SelectApplicationTermsAndCondition(model.parlourid);
                if (ModelTnc != null)
                {
                    txtTnC.Text               = ModelTnc.TermsAndCondition;
                    txtTncFuneral.Text        = ModelTnc.TermsAndConditionFuneral;
                    txtTncTombstone.Text      = ModelTnc.TermsAndConditionTombstone;
                    txtPolicyDeclaration.Text = ModelTnc.Declaration;
                }
                //=============IsAutoGeneratedPolicyNumber
                Boolean AutoGeneratePolicyNo = model.IsAutoGeneratedPolicyNo;
                if (AutoGeneratePolicyNo == null || AutoGeneratePolicyNo == false)
                {
                    cbAutoGeneratePolicy.Checked = false;
                }
                else if (AutoGeneratePolicyNo == true)
                {
                    cbAutoGeneratePolicy.Checked = true;
                }
                //===============

                btnSubmite.Text   = "Update";
                btnUpload.Enabled = true;
            }
        }