Esempio n. 1
0
        private void initControl()
        {
            this.Cursor = Cursors.WaitCursor;
            this.btnSave.Enabled = false;
            this.btnDelete.Enabled = false;

            this.txtUserName.Clear();
            this.txtProcessCode.Clear();
            this.txtJoinTime.Clear();
            this.txtJoinMenu.Clear();
            this.txtComplainContent.Clear();
            this.txtBranchCode.Clear();
            this.txtBranchName.Clear();
            this.cboAgentNo.ResetText();
            this.dtReplyTime.ResetText();
            this.txtComent.Clear();
            this.txtSequence.Clear();

            this.dtReplyTime.Value = DateTime.Now.AddDays(10);


            AgentWechatAccountDao agentWechatAccountDao = new AgentWechatAccountDao();
            IList<AgentWechatAccount> agentWechatAccountList = agentWechatAccountDao.GetAllAgentOrBranch();
            this.cboAgentNo.Items.Clear();
            //  this.lstAgentType.Items.Add("所有渠道");
            foreach (AgentWechatAccount agentWechatAccount in agentWechatAccountList)
            {
                if (agentWechatAccount.type.Contains("代理商"))
                {
                    listOnit.Add(agentWechatAccount.agentNo + ":" + agentWechatAccount.agentName);
                       // this.cboAgentNo.Items.Add(agentWechatAccount.agentNo + ":" + agentWechatAccount.agentName);

                }
            }
            this.cboAgentNo.Items.AddRange(listOnit.ToArray());

            this.Cursor = Cursors.Default;
        }
Esempio n. 2
0
        private void initControl()
        {
            this.Cursor = Cursors.WaitCursor;
            this.btnSave.Enabled = false;
            this.btnDelete.Enabled = false;
            this.txtGroupName.Enabled = true;
            //this.btnClear.Enabled = true;
            this.txtGroupName.Clear();
            this.txtDescription.Clear();
            AgentTypeDao agentTypeDao = new AgentTypeDao();
            agentTypeList = agentTypeDao.GetDistinctType();
            this.lstAgentType.Items.Clear();
            this.lstAllType.Items.Clear();
            this.lstAssignType.Items.Clear();
          //  this.lstAgentType.Items.Add("所有渠道");
            foreach (AgentType agentType in agentTypeList)
            {
                this.lstAgentType.Items.Add(agentType.agentType);

                this.lstAllType.Items.Add(agentType.agentType);
            }


            AgentWechatAccountDao agentWechatAccountDao = new AgentWechatAccountDao();
             agentWechatAccountList = agentWechatAccountDao.GetAllAgentOrBranch();
            this.lstUser.Items.Clear();
            lstAllAgent.Items.Clear();
            lstAssignAgent.Items.Clear();
            //  this.lstAgentType.Items.Add("所有渠道");
            ArrayList list = new ArrayList();
            foreach (AgentWechatAccount agentWechatAccount in agentWechatAccountList)
            {
                if (!String.IsNullOrEmpty(agentWechatAccount.regionName))
                {
                    if (!list.Contains(agentWechatAccount.branchNo))
                    {
                        this.lstUser.Items.Add(agentWechatAccount.branchNo + ":" + agentWechatAccount.branchName);
                        this.lstAllAgent.Items.Add(agentWechatAccount.branchNo + ":" + agentWechatAccount.branchName);
                        list.Add(agentWechatAccount.branchNo);
                    }
                }
                else
                {
                    if (!String.IsNullOrEmpty(agentWechatAccount.branchNo))
                    {
                        if (!list.Contains(agentWechatAccount.branchNo))
                        {
                            this.lstUser.Items.Add(agentWechatAccount.branchNo + ":" + agentWechatAccount.branchName);
                            this.lstAllAgent.Items.Add(agentWechatAccount.branchNo + ":" + agentWechatAccount.branchName);
                            list.Add(agentWechatAccount.branchNo);
                        }
                    }
                    else
                    {
                        if (!list.Contains(agentWechatAccount.agentNo))
                        {
                            this.lstUser.Items.Add(agentWechatAccount.agentNo + ":" + agentWechatAccount.agentName);
                            this.lstAllAgent.Items.Add(agentWechatAccount.agentNo + ":" + agentWechatAccount.agentName);
                            list.Add(agentWechatAccount.agentNo);
                        }
                    }
                }
            }

            this.Cursor = Cursors.Default;
        }