private void PopulateIndustries() { var bizM = new bizMessage(); var biz = new bizIndustry(); var inds = biz.ListIndustriesByKeyword(txtFindIndustry.Text); lstIndustry.Items.Clear(); if (txtFindIndustry.Text != "") { foreach (var ind in inds) { lstIndustry.Items.Add(new ListItem(ind.IndustryName + " (" + ind.AnzsicCode + ")", ind.AnzsicCode)); } lstIndustry.Visible = true; divIndustry.Visible = true; lblFoundIndustries.Text = lstIndustry.Items.Count + " industries found"; } else { lstIndustry.Visible = false; divIndustry.Visible = false; lblFoundIndustries.Text = ""; } }
private void PopulateIndustries() { bizMessage bizM = new bizMessage(); bizIndustry biz = new bizIndustry(); IQueryable <Industry> inds = biz.ListIndustriesByKeyword(this.txtFindIndustry.Text); this.ucMessanger1.ProcessMessages(biz.MSGS, true); this.lstIndustry.Items.Clear(); if (this.txtFindIndustry.Text != "") { foreach (Industry ind in inds) { this.lstIndustry.Items.Add(new ListItem(ind.IndustryName + " (" + ind.AnzsicCode + ")", ind.AnzsicCode)); } this.lstIndustry.Visible = true; this.lblFoundIndustries.Text = this.lstIndustry.Items.Count.ToString() + " industries found"; } else { this.lstIndustry.Visible = false; this.lblFoundIndustries.Text = ""; } }
private void SetIndustries(string industries) { if (industries == null) { return; } char[] sep = { '|' }; var anzsic = industries.Split(sep); var biz = new bizIndustry(); var inds = biz.GetIndustriesByAnzsicCodes(anzsic); if (inds.Count == 0) { return; } lstIndustry.Items.Clear(); foreach (var ind in inds) { var li = new ListItem(ind.IndustryName + " (" + ind.AnzsicCode + ")", ind.AnzsicCode); li.Selected = true; lstIndustry.Items.Add(li); } lstIndustry.Visible = true; divIndustry.Visible = true; }
private void PopulateClientDetails() { bizMessage bizM = new bizMessage(); bizSetting bizS = new bizSetting(); bizClient biz = new bizClient(); Client c; c = biz.GetClient(Convert.ToInt32(Request.QueryString["cid"])); this.ucMessanger1.ProcessMessages(biz.MSGS, true); if (c == null) { return; } //read only this.lblClientName.Text = c.ClientName; this.lblOfficeFacsimilie.Text = c.OfficeFacsimilie; this.lblOfficePhone.Text = c.OfficePhone; if (c.Address == null) { this.lblAddress.Text = "no address"; this.lblAddress.CssClass = "page-text-nodata"; } else { this.lblAddress.Text = c.Address + ", " + c.Location + " " + c.StateCode + " " + c.PostCode; } //executive var u = bizUser.GetSMIAccountExecutiveIdBOAMPSUserName(c.AccountExecutiveID); bizUser.enGageUser exec = bizUser.GetAccountExecutive(u); ucMessanger1.ProcessMessages(biz.MSGS, false); lblAccountExecutive.Text = "<b>" + exec.DisplayName + "</b>" + ", " + exec.Branch + " (" + exec.Region + ")"; //general //this.ddlAccountExecutive.SelectedValue = c.AccountExecutiveID.ToString(); this.txtClientCode.Text = c.ClientCode; this.txtClientName.Text = c.ClientName; this.txtRegisteredName.Text = c.RegisteredName; this.txtInsuredName.Text = c.InsuredName; if (c.ABNACN != null) { this.txtABNACN.Text = c.ABNACN; } this.txtSource.Text = c.Source; this.txtOfficeFacsimilie.Text = c.OfficeFacsimilie; this.txtOfficePhone.Text = c.OfficePhone; //address this.txtAddress.Text = c.Address; if (c.Location != null) { this.ucAUPSS1.PostCode = c.PostCode; this.ucAUPSS1.SetSuburbAndStateCode(c.Location, c.StateCode); //this.ucAUPSS1.Suburb = c.Location; //this.ucAUPSS1.StateCode = c.StateCode; this.rblAddressTypes.SelectedIndex = 0; } else { this.rblAddressTypes.SelectedIndex = 1; } //industry if (c.AnzsicCode != null) { bizIndustry bizI = new bizIndustry(); Industry ind = bizI.GetIndustry(c.AnzsicCode); this.ucMessanger1.ProcessMessages(bizI.MSGS, false); this.lstIndustry.Items.Add(new ListItem(ind.IndustryName + " (" + ind.AnzsicCode + ")", ind.AnzsicCode)); this.lstIndustry.SelectedIndex = 0; if (this.lstIndustry.Items.Count > 0) { this.lstIndustry.Visible = true; } PopulateAssociations(); if (c.AssociationCode == null) { this.ddlAssociation.SelectedIndex = 0; } else { this.ddlAssociation.Items.RemoveAt(0); this.ddlAssociation.SelectedValue = c.AssociationCode; } this.txtAssociationMemberNumber.Text = c.AssociationMemberNumber; } //audit ((Main)Master).HeaderDetails = "Client added by " + bizActiveDirectory.GetUserFullName(c.AddedBy) + " (" + string.Format("{0:dd-MMM-yy}", c.Added) + ")"; if (c.Modified.HasValue == true) { ((Main)Master).HeaderDetails += " / modified by " + bizActiveDirectory.GetUserFullName(c.ModifiedBy) + " (" + string.Format("{0:dd-MMM-yy}", c.Modified.Value) + ")"; } }