コード例 #1
0
        private void AgentDGV_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (AgentDGV.CurrentRow == null)
            {
                return;
            }
            currentAgentId = Convert.ToInt32(AgentDGV.CurrentRow.Cells["id"].Value);
            int    currentManagerId = Convert.ToInt32(_childDS.Tables[0].Select("id=" + currentAgentId)[0]["manager_id"]);
            string colName          = AgentDGV.CurrentCell.OwningColumn.Name;

            switch (colName)
            {
            case "code":
            case "agentName":
            {
                OMWorkBench.CreateForm(new ChildAgentInfoForm(currentAgentId));
                break;
            }

            case "communicate":
            {
                OMWorkBench.CreateForm(new CommunicateLoginForm(currentAgentId, -1, currentManagerId));
                break;
            }

            case "managerMind":
            {
                OMWorkBench.CreateForm(new ManagerMindForm(currentManagerId));
                break;
            }
            }
        }
コード例 #2
0
        private void userDGV_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (userDGV.CurrentRow == null)
            {
                return;
            }
            int    userID           = Convert.ToInt32(userDGV.CurrentRow.Cells["id"].Value);
            bool   isreserve        = (userDGV.CurrentRow.Cells["isReserve"].Value.ToString() == "潜在");
            int    currentManagerId = Convert.ToInt32(_userDS.Tables["user"].Select("id=" + userID)[0]["manager_id"]);
            string colName          = userDGV.CurrentCell.OwningColumn.Name;

            switch (colName)
            {
            case "userId":
            case "userName":
            {
                ViewSingleUserForm viewSingleUser = new ViewSingleUserForm(userID, isreserve);
                viewSingleUser.ShowDialog(this);
                break;
            }

            case "communicate":
            {
                OMWorkBench.CreateForm(new CommunicateLoginForm(-1, userID, currentManagerId));
                break;
            }

            case "managerRemind":
            {
                OMWorkBench.CreateForm(new ManagerMindForm(currentManagerId));
                break;
            }
            }
        }
コード例 #3
0
        /// <summary>
        /// 广告管理
        /// </summary>
        public override void CheckCmd()
        {
            int    userId   = Convert.ToInt32(userDGV.CurrentRow.Cells["id"].Value);
            string userName = userDGV.CurrentRow.Cells["userName"].Value.ToString();

            OMWorkBench.CreateForm(new ViewAdvSiteForm(userId, userName));
        }
コード例 #4
0
        private void MainForm4_Load(object sender, EventArgs e)
        {
            LeftTreeView leftTree = new LeftTreeView();

            leftTree.Show(MainDockPanel, DockState.DockLeft);

            OMWorkBench.CreateForm(new SelfManagerForm(OMWorkBench.MangerId));//  AgentInfoForm(OMWorkBench.AgentId));
        }
コード例 #5
0
        private void Button_Click(object sender, EventArgs e)
        {
            Button btn = sender as Button;

            switch (btn.Name)
            {
            case "agentBtn":
            {
                OMWorkBench.CreateForm(new ViewAgentForm(OMWorkBench.AgentId, OMWorkBench.MangerId, OMWorkBench.AgentName, false));
                break;
            }

            case "userBtn":
            {
                OMWorkBench.CreateForm(new ViewUserForm(false));
                break;
            }

            case "jeeluBtn":
            {
                OMWorkBench.CreateForm(new AgentInfoForm(OMWorkBench.AgentId));
                break;
            }

            case "webUnionBtn":
            {
                OMWorkBench.CreateForm(new ViewWebUnionForm());
                break;
            }

            case "newBtn":
            {
                OMWorkBench.CreateForm(new ViewNewsForm());
                break;
            }

            case "managerBtn":
            {
                OMWorkBench.CreateForm(new ViewManagerForm(OMWorkBench.AgentId, OMWorkBench.AgentName));
                break;
            }

            case "selfDefinedRetrunBtn":
            {
                OMWorkBench.CreateForm(new ViewCustomTask());
                break;
            }

            default:
                break;
            }
        }
コード例 #6
0
        private void GiveDataToSiteForm(string tabText, string filterStr)
        {
            if (_webSiteDS == null)
            {
                _webSiteDS = OMWorkBench.DataAgent.GetWebSite(-1);
            }
            string          siteTypeCount = tabText + "网站数量: ";
            ViewWebSiteForm viewWebSite   = new ViewWebSiteForm(_webSiteDS, webUnionDS, siteTypeCount);

            viewWebSite.FilterStr = filterStr;
            viewWebSite.TabText  += "--" + tabText;
            OMWorkBench.CreateForm(viewWebSite);
        }
コード例 #7
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridViewCell cell = advWebSiteDGV.CurrentRow.Cells[e.ColumnIndex] as DataGridViewCell;
            int    siteId         = Convert.ToInt32(advWebSiteDGV.CurrentRow.Cells["id"].Value);
            string sitename       = advWebSiteDGV.CurrentRow.Cells["siteName"].Value.ToString();

            switch (cell.OwningColumn.Name)
            {
            case "siteName":
            {
                OMWorkBench.CreateForm(new ViewAdvForm(siteId, sitename));
                break;
            }
            }
        }
コード例 #8
0
        private void ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ToolStripMenuItem item = sender as ToolStripMenuItem;

            switch (item.Name)
            {
            case "jeeluToolStripMenuItem":
            {
                OMWorkBench.CreateForm(new AgentInfoForm(OMWorkBench.AgentId));
                break;
            }

            case "managerToolStripMenuItem":
            {
                OMWorkBench.CreateForm(new ViewManagerForm(OMWorkBench.AgentId, OMWorkBench.AgentName));
                break;
            }

            case "agentToolStripMenuItem":
            {
                OMWorkBench.CreateForm(new ViewAgentForm(OMWorkBench.AgentId, OMWorkBench.MangerId, OMWorkBench.AgentName, false));
                break;
            }

            case "userToolStripMenuItem":
            {
                OMWorkBench.CreateForm(new ViewUserForm(false));
                break;
            }

            case "webUnionToolStripMenuItem":
            {
                OMWorkBench.CreateForm(new ViewWebUnionForm());
                break;
            }

            case "newsToolStripMenuItem":
            {
                // OMWorkBench.CreateForm(new ViewNewsForm());
                break;
            }

            case "msgToolStripMenuItem":
            {
                break;
            }
            }
        }
コード例 #9
0
        private void managerDGV_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int     managerID  = Convert.ToInt32(managerDGV.CurrentRow.Cells["id"].Value);
            DataRow currentRow = _managerTable.Select("id=" + managerID)[0];

            switch (managerDGV.CurrentCell.OwningColumn.Name)
            {
            case "name":
            {
                SelfManagerForm managerForm = new SelfManagerForm(managerID);
                OMWorkBench.CreateForm(managerForm);
                break;
            }

            case "log": break;

            case "rights":
            {
                if (canModifyOthers)
                {
                    string       rights    = currentRow["rights"].ToString();
                    RightSetForm rightForm = new RightSetForm(rights);
                    if (rightForm.ShowDialog() == DialogResult.OK)
                    {
                        currentRow["rights"] = OMWorkBench.BitStrToStr(rightForm.BitArrayStr);
                        int I = OMWorkBench.DataAgent.UpdateManager(_managerTable.GetChanges());
                        _managerTable.AcceptChanges();
                    }
                }
                break;
            }

            case "remind":
            {
                OMWorkBench.CreateForm(new ManagerMindForm(managerID));
                break;
            }

            default: break;
            }
        }
コード例 #10
0
        private void webUnionDGV_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int unionId = Convert.ToInt32(webUnionDGV.CurrentRow.Cells["webid"].Value);

            switch (webUnionDGV.CurrentCell.OwningColumn.Name)
            {
            case "uname":
            {
                DataSet _webSiteDS    = OMWorkBench.DataAgent.GetWebSite(unionId);
                string  siteTypeCount = "网站数量: ";        //+ _webSiteDS.Tables["website"].Rows.Count.ToString();
                OMWorkBench.CreateForm(new ViewWebSiteForm(_webSiteDS, webUnionDS, siteTypeCount));
                break;
            }

            case "viewInfo":
            {
                DataSet          _webSiteDS = OMWorkBench.DataAgent.GetWebSite(unionId);
                WebUnionInfoForm unionInfo  = new WebUnionInfoForm(unionId, _webSiteDS);
                unionInfo.ShowDialog(this);
                break;
            }
            }
        }
コード例 #11
0
        private void Lab_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            LinkLabel linkLabel = sender as LinkLabel;

            switch (linkLabel.Name)
            {
            case "SubAgentNumLab":
            {
                OMWorkBench.CreateForm(new ViewAgentForm(OMWorkBench.AgentId, OMWorkBench.MangerId, OMWorkBench.AgentName, true));
                break;
            }

            case "SubUserNumLab":
            {
                OMWorkBench.CreateForm(new ViewUserForm(true));        //OMWorkBench.AgentId, OMWorkBench.MangerId, OMWorkBench.AgentName));

                break;
            }

            case "ChargeCountLab": break;

            case "ChargeSumLab": break;
            }
        }
コード例 #12
0
        private void LinkLab_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            LinkLabel clickLab = sender as LinkLabel;

            switch (clickLab.Name)
            {
            case "SubStandardAgentNumLab":
            case "SubLateAgentNumLab":
            {
                OMWorkBench.CreateForm(new ViewAgentForm(OMWorkBench.AgentId, OMWorkBench.MangerId, _agentDS.Tables["organization"].Rows[0]["name"].ToString(), false));
                break;
            }

            case "SubStandardUserNumLab":
            case "SubLateUserNumLab":
            {
                OMWorkBench.CreateForm(new ViewUserForm(false));
                break;
            }

            case "ManagerNumLab":
            {
                OMWorkBench.CreateForm(new ViewManagerForm(OMWorkBench.AgentId, OMWorkBench.AgentName));
                break;
            }

            case "ChargeLab":
            {
                DataTable           chargeHistory     = OMWorkBench.DataAgent.GetAgentChargeRecords(OMWorkBench.AgentId);
                ChargeAgentHistForm chargeHistoryForm = new ChargeAgentHistForm(chargeHistory);
                chargeHistoryForm.ShowDialog(this);
                break;
            }

            case "ChargeSubLab":
            {
                DataTable           chargeHistory     = OMWorkBench.DataAgent.GetAgentChargeSubRecords(OMWorkBench.AgentId);
                ChargeAgentHistForm chargeHistoryForm = new ChargeAgentHistForm(chargeHistory);
                chargeHistoryForm.ShowDialog(this);
                break;
            }

            case "ReturnLab":
            {
                int               sendOrgId    = -1;
                int               receiveOrgId = OMWorkBench.AgentId;
                DataTable         returnTable  = OMWorkBench.DataAgent.GetReturnRecords(sendOrgId, receiveOrgId);
                ReturnRecordsForm returnForm   = new ReturnRecordsForm(returnTable);
                returnForm.ShowDialog(this);
                break;
            }

            case "ReturnSubLab":
            {
                int               sendOrgId    = -1;
                int               receiveOrgId = OMWorkBench.AgentId;
                DataTable         returnTable  = OMWorkBench.DataAgent.GetReturnRecords(sendOrgId, receiveOrgId);
                ReturnRecordsForm returnForm   = new ReturnRecordsForm(returnTable);
                returnForm.ShowDialog(this);
                break;
            }

            default: break;
            }
        }
コード例 #13
0
 public override void NewCmd()
 {
     OMWorkBench.CreateForm(new NewManagerForm(OMWorkBench.AgentId));
 }
コード例 #14
0
 public override void NewCmd()
 {
     OMWorkBench.CreateForm(new NewManagerForm(Convert.ToInt32(_agentDS.Tables["organization"].Rows[0]["id"])));
 }