private SearchLeadCondition GetSearchCondition() { SearchLeadCondition data = new SearchLeadCondition(); data.TicketId = txtTicketID.Text.Trim(); data.Firstname = txtFirstname.Text.Trim(); data.Lastname = txtLastname.Text.Trim(); data.CardType = cmbCardType.Items.Count > 0 ? cmbCardType.SelectedItem.Value : string.Empty; //ประเภทบุคคล data.CitizenId = txtCitizenId.Text.Trim(); data.CampaignId = cmbCampaign.SelectedItem.Value; data.ChannelId = cmbChannel.SelectedItem.Value; data.OwnerUsername = cmbOwnerLeadSearch.Items.Count > 0 ? cmbOwnerLeadSearch.SelectedItem.Value : string.Empty; //Owner Lead data.OwnerBranch = cmbOwnerBranchSearch.Items.Count > 0 ? cmbOwnerBranchSearch.SelectedItem.Value : string.Empty; //Owner Branch data.DelegateBranch = cmbDelegateBranchSearch.Items.Count > 0 ? cmbDelegateBranchSearch.SelectedItem.Value : string.Empty; //Delegate Branch data.DelegateLead = cmbDelegateLeadSearch.Items.Count > 0 ? cmbDelegateLeadSearch.SelectedItem.Value : string.Empty; //Delegate Lead data.CreateByBranch = cmbCreatebyBranchSearch.Items.Count > 0 ? cmbCreatebyBranchSearch.SelectedItem.Value : string.Empty; //CreateBy Branch data.CreateBy = cmbCreatebySearch.Items.Count > 0 ? cmbCreatebySearch.SelectedItem.Value : string.Empty; //CreateBy data.CreatedDate = tdmCreateDate.DateValue; data.AssignedDate = tdmAssignDate.DateValue; data.StatusList = GetStatusList(); data.PageIndex = pcTop.SelectedPageIndex > -1 ? pcTop.SelectedPageIndex : 0; data.StaffType = SlmScr003Biz.GetStaffType(HttpContext.Current.User.Identity.Name); data.SortExpression = SortExpressionProperty; data.SortDirection = SortDirectionProperty.ToString(); data.AdvancedSearch = txtAdvanceSearch.Text.Trim() == "Y" ? true : false; data.ContractNoRefer = txtContractNoRefer.Text.Trim(); return(data); }
private void CheckTicketIdPrivilege(string ticketId) { string logError = ""; if (!RoleBiz.GetTicketIdPrivilege(ticketId, HttpContext.Current.User.Identity.Name, SlmScr003Biz.GetStaffType(HttpContext.Current.User.Identity.Name), "", "SLM_SCR_011", out logError)) { if (!string.IsNullOrEmpty(logError)) { _log.Error(logError); } string message = "ข้อมูลผู้มุ่งหวังรายนี้ ท่านไม่มีสิทธิในการมองเห็น"; LeadOwnerDelegateData data = SlmScr011Biz.GetOwnerAndDelegateName(ticketId); if (data != null) { if (!string.IsNullOrEmpty(data.OwnerName) && !string.IsNullOrEmpty(data.DelegateName)) { message += " ณ ปัจจุบันผู้เป็นเจ้าของ คือ " + data.OwnerName.ToString().Trim() + " และ Delegate คือ " + data.DelegateName.ToString().Trim(); } else if (!string.IsNullOrEmpty(data.OwnerName)) { message += " ณ ปัจจุบันผู้เป็นเจ้าของ คือ " + data.OwnerName.ToString().Trim(); } else if (!string.IsNullOrEmpty(data.DelegateName)) { message += " ณ ปัจจุบัน Delegate คือ " + data.DelegateName.ToString().Trim(); } } else { message = "ไม่พบ Ticket Id " + Request["ticketid"].ToString() + " ในระบบ"; } AppUtil.ClientAlertAndRedirect(Page, message, "SLM_SCR_003.aspx"); } else { if (!string.IsNullOrEmpty(logError)) { _log.Error(logError); } } }