private void frmPotentialCustomersPickInfo_Load(object sender, EventArgs e) { BLLAdviser.WSAdviser wsa = new BLLAdviser.WSAdviser(); int a=1,b; var res = wsa.Search(new BLLAdviser.Adviser() { Id = -1, UserId = Global.CurrentUser.Id , Name ="",Position=""}, ref a, 1, out b); if (res == null) { MessageBox.Show("当前界面只允许会籍顾问访问"); return; } aid = res[0].Id; tbAdviserId.Text = aid.ToString(); LoadSelf(); LoadDataAll(); }
private void frmPotentialCustomersToVip_Load(object sender, EventArgs e) { var wsa = new BLLAdviser.WSAdviser(); int a = 1, b; var result = wsa.Search(new BLLAdviser.Adviser() { Id = -1, Name = "", Position = "" }, ref a, 100000, out b); if (result == null) return; List<UI.BLLAdviser.Adviser> advisers = new List<BLLAdviser.Adviser>(); advisers.AddRange(result); advisers.Insert(0, new BLLAdviser.Adviser() { Id = -1, Name = "请选择" }); cbAdviser.DataSource = advisers; cbAdviser.DisplayMember = "Name"; cbAdviser.ValueMember = "Id"; LoadByPaging(1); }
private void frmPotentialCustomersTrackeInfo_Load(object sender, EventArgs e) { dataAdviserInfo.ClearSelection(); var wsa = new BLLAdviser.WSAdviser(); int a = 1, b; var result = wsa.Search(new BLLAdviser.Adviser() { Id = -1, Name = "", Position = "" }, ref a, 100000, out b); this.dataAdviserInfo.DataSource = result; LoadDataAll(); dataAdviserInfo.CellMouseClick += (s, ee) => { var res = ws.Search(new PotentialMember() { Name = "", AdviserId = Convert.ToInt32(dataAdviserInfo.SelectedRows[0].Cells[0].Value), },false, ref a, 10000000, out b); dataPotentialInfo.DataSource = res; }; }
private void frmPotentialCustomersInfoMgr_Load(object sender, EventArgs e) { var wsa = new BLLAdviser.WSAdviser(); int a = 1 , b; if (Global.CurrentUser.UserType == "2") { ads = wsa.Search(new BLLAdviser.Adviser() { Id = -1, UserId = Global.CurrentUser.Id, Name = "", Position = "" }, ref a, 1, out b); if (ads == null) { MessageBox.Show("当前界面只允许会籍顾问访问"); return; } } else if (Global.CurrentUser.UserType == "0") { ads = wsa.Search(new BLLAdviser.Adviser() { Id = -1, Name = "", Position = "" }, ref a, 100000, out b); } List<UI.BLLAdviser.Adviser> advisers = new List<BLLAdviser.Adviser>(); advisers.Add(new BLLAdviser.Adviser() { Id = -1, Name = "全部" }); if(ads!=null) advisers.AddRange(ads); cbAdviser.DataSource = advisers; cbAdviser.DisplayMember = "Name"; cbAdviser.ValueMember = "Id"; cbGender.SelectedIndex = 0; LoadByPaging(1); //显示/隐藏控件 if (Global.CurrentUser.UserType == "2") { //btnAdd.Visible = btnModify.Visible = btnDel.Visible = btnTrackInfo.Visible= false; } /// dataVipInfo.CellMouseClick += (ss, ee) => { if (dataVipInfo.SelectedRows != null && dataVipInfo.SelectedRows.Count > 0) { numberId.Value = Convert.ToDecimal(dataVipInfo.SelectedRows[0].Cells[0].Value); tbName.Text = dataVipInfo.SelectedRows[0].Cells[1].Value.ToString(); cbGender.Text = dataVipInfo.SelectedRows[0].Cells[2].Value.ToString(); tbMPhone.Text = dataVipInfo.SelectedRows[0].Cells[3].Value.ToString(); object value = pms[dataVipInfo.SelectedRows[0].Index].AdviserId; cbAdviser.SelectedValue = value==null?-1:value; tbChannel.Text = dataVipInfo.SelectedRows[0].Cells[7].Value.ToString(); tbRemarks.Text = dataVipInfo.SelectedRows[0].Cells[8].Value.ToString(); } }; }
private void frmVipInfoMgr_Load(object sender, EventArgs e) { /* * 0,管理员 * 1,前台 * 2,会籍 * 3,财务 */ string userType = Global.CurrentUser.UserType; switch (userType) { case "1": this.btnAdd.Visible = false; this.Text = "会员资料管理--前台"; break; case "2": this.btnAdd.Visible = false; this.btnModify.Visible = false; this.btnDel.Visible = false; this.btnChange.Visible = false; this.btnVacate.Visible = false; this.btnEnter.Visible = false; this.Text = "会员资料管理--会籍部"; BLLAdviser.WSAdviser wsa = new BLLAdviser.WSAdviser(); int a = 1, b; var res = wsa.Search(new BLLAdviser.Adviser() { UserId = Global.CurrentUser.Id, Name = "", Position = "" }, ref a, 1, out b); if (res == null) { MessageBox.Show("当前界面只允许会籍顾问访问"); return; } aid = res[0].Id; break; case "3": this.btnModify.Visible = false; this.btnDel.Visible = false; this.btnChange.Visible = false; this.btnVacate.Visible = false; this.btnEnter.Visible = false; this.Text = "会员资料管理--财务部"; break; } LoadByPaging(1); }