private void btnSearch_Click(object sender, EventArgs e) { if (tbCardNoQ.Text.Trim().Length < 1 && tbNeedName.Text.Trim().Length < 1) { ClearValue(); return; } int a = 1, b; var result = wsm.Search(new Member() { //Id = (int)numberCardNo.Value, CardNo = this.tbCardNoQ.Text.Trim(), Name = tbNeedName.Text.Trim(), Mobilephone = "", CoachId = -1, CardType = "" }, true, ref a, 1, out b); if (result != null) { m = result[0]; SetValue(m); } else { m = null; ClearValue(); } }
/// <summary> /// operate:0-添加;1-更新;2-转卡;3-请假(延长有效期) /// </summary> /// <param name="memberToUpdate"></param> /// <param name="operate">操作</param> public frmAddNewVip(Member memberToUpdate, int operate) : this() { this.memberToUpdate = memberToUpdate; switch (operate) { case 1: this.Text = "会员信息修改"; break; case 2: this.Text = "会员转卡"; break; case 3: this.Text = "会员请假"; break; default: break; } this.operate = operate; }
/// <remarks/> public void ConsumptionScoreAsync(Member c, int score) { this.ConsumptionScoreAsync(c, score, null); }
/// <remarks/> public void ConsumptionScoreAsync(Member c, int score, object userState) { if ((this.ConsumptionScoreOperationCompleted == null)) { this.ConsumptionScoreOperationCompleted = new System.Threading.SendOrPostCallback(this.OnConsumptionScoreOperationCompleted); } this.InvokeAsync("ConsumptionScore", new object[] { c, score}, this.ConsumptionScoreOperationCompleted, userState); }
/// <remarks/> public void GainScoreAsync(Member c, int score) { this.GainScoreAsync(c, score, null); }
public string ConsumptionScore(Member c, int score) { object[] results = this.Invoke("ConsumptionScore", new object[] { c, score}); return ((string)(results[0])); }
void SetValue(Member m) { if (m == null) return; tbName.Text = m.Name; tbCardNo.Text = m.Id.ToString(); tbCardType.Text = m.CardType; tbMPhone.Text = m.Mobilephone; tbnational.Text = m.People; tbNationality.Text = m.Nation; tbGender.Text = m.Gender; tbNo2.Text = m.ContractNo; numHowMach.Value = (decimal)m.CardStartMoney; numRemain.Value = (decimal)m.CardRestMoney; dataBgn.Value = m.RegistDate; dataEnd.Value = m.ExpireDate; HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(Global.ServerBaseUrl + "Images/" + m.Id + ".jpg"); req.Method = "GET"; try { var resp = req.GetResponse(); Stream stream = resp.GetResponseStream(); if (stream == null || !stream.CanRead) return; pVideo.BackgroundImage = Bitmap.FromStream(stream); stream.Close(); } catch { pVideo.BackgroundImage = Bitmap.FromFile("default.jpg"); } }
/// <remarks/> public void AddMemberAsync(Member m, byte[] picData) { this.AddMemberAsync(m, picData, null); }
/// <remarks/> public void SearchAsync(Member c, bool includeNULLAid, int page, int pageSize, object userState) { if ((this.SearchOperationCompleted == null)) { this.SearchOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSearchOperationCompleted); } this.InvokeAsync("Search", new object[] { c, includeNULLAid, page, pageSize}, this.SearchOperationCompleted, userState); }
/// <remarks/> public void ChangeAsync(Member m, byte[] picData) { this.ChangeAsync(m, picData, null); }
public Member[] Search(Member c, bool includeNULLAid, ref int page, int pageSize, out int totalPages) { object[] results = this.Invoke("Search", new object[] { c, includeNULLAid, page, pageSize}); page = ((int)(results[1])); totalPages = ((int)(results[2])); return ((Member[])(results[0])); }
/// <remarks/> public void SearchAsync(Member c, bool includeNULLAid, int page, int pageSize) { this.SearchAsync(c, includeNULLAid, page, pageSize, null); }
/// <remarks/> public void PotentialToMemberAsync(Member m, byte[] picData, int pid, object userState) { if ((this.PotentialToMemberOperationCompleted == null)) { this.PotentialToMemberOperationCompleted = new System.Threading.SendOrPostCallback(this.OnPotentialToMemberOperationCompleted); } this.InvokeAsync("PotentialToMember", new object[] { m, picData, pid}, this.PotentialToMemberOperationCompleted, userState); }
/// <remarks/> public void PotentialToMemberAsync(Member m, byte[] picData, int pid) { this.PotentialToMemberAsync(m, picData, pid, null); }
public int PotentialToMember(Member m, [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] byte[] picData, int pid) { object[] results = this.Invoke("PotentialToMember", new object[] { m, picData, pid}); return ((int)(results[0])); }
/// <remarks/> public void UpdateAsync(Member m, byte[] picData) { this.UpdateAsync(m, picData, null); }
public string CoachAllot(Member c) { object[] results = this.Invoke("CoachAllot", new object[] { c}); return ((string)(results[0])); }
public string Change(Member m, [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] byte[] picData) { object[] results = this.Invoke("Change", new object[] { m, picData}); return ((string)(results[0])); }
void SetValue(Member m) { if (m == null) return; tbName.Text = m.Name; tbCardNo.Text = m.Id.ToString(); cbCardKind.SelectedItem = m.CardType; tbMobilephone.Text = m.Mobilephone; tbnational.Text = m.People; tbNationality.Text = m.Nation; cbSex.SelectedItem = m.Gender; tbNo2.Text = m.ContractNo; tbTelephone.Text = m.Telephone; dateBirthday.Value = m.Birthday.Value; numHowMach.Value = (decimal)m.CardStartMoney; numRemain.Value = (decimal)m.CardRestMoney; dataBgn.Value = m.RegistDate; dataEnd.Value = m.ExpireDate; tbTips.Text = m.Remarks; numTempTimes.Value = m.TempTimes; m.Birthday = dateBirthday.Value; m.Email = tbEmail.Text.Trim() == "" ? "无" : tbEmail.Text.Trim(); HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(Global.ServerBaseUrl + "Images/" + m.Id + ".jpg"); req.Method = "GET"; try { var resp = req.GetResponse(); Stream stream = resp.GetResponseStream(); if (stream == null || !stream.CanRead) return; pVideo.BackgroundImage = Bitmap.FromStream(stream); stream.Close(); } catch { pVideo.BackgroundImage = Bitmap.FromFile("default.jpg"); } }
/// <remarks/> public void ChangeAsync(Member m, byte[] picData, object userState) { if ((this.ChangeOperationCompleted == null)) { this.ChangeOperationCompleted = new System.Threading.SendOrPostCallback(this.OnChangeOperationCompleted); } this.InvokeAsync("Change", new object[] { m, picData}, this.ChangeOperationCompleted, userState); }
void SetValue(Member m) { if (m == null) return; tbName.Text = m.Name; tbCardNo.Text = m.Id.ToString(); tbCardType.Text = m.CardType; tbTempTimes.Text = m.TempTimes.ToString(); tbCoach.Text = m.CoachId.ToString(); tbPhone.Text = m.Telephone; tbMPhone.Text = m.Mobilephone; tbnational.Text = m.People; tbNationality.Text = m.Nation; tbGender.Text = m.Gender; tbNo2.Text = m.ContractNo; numHowMach.Value = (decimal)m.CardStartMoney; numRemain.Value = (decimal)m.CardRestMoney; dataBgn.Value = m.RegistDate; dataEnd.Value = m.ExpireDate; tbTips.Text = m.Remarks; tbJoneCount.Text = m.JoneCount.ToString(); dateBirthday.Value = (DateTime)m.Birthday; tbEmail.Text = m.Email; if (m.Birthday.Value.Month == DateTime.Now.Month && m.Birthday.Value.Day == DateTime.Now.Day) MessageBox.Show(string.Format("{0}先生/女士,生日快乐!", tbName.Text)); HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(Global.ServerBaseUrl + "Images/" + m.Id + ".jpg"); req.Method = "GET"; try { var resp = req.GetResponse(); Stream stream = resp.GetResponseStream(); if (stream == null || !stream.CanRead) return; pVideo.BackgroundImage = Bitmap.FromStream(stream); stream.Close(); } catch { pVideo.BackgroundImage = Bitmap.FromFile("default.jpg"); } }
/// <remarks/> public void CoachAllotAsync(Member c) { this.CoachAllotAsync(c, null); }
public frmVipQuery(Member m) : this() { this.memberToView = m; }
/// <remarks/> public void CoachAllotAsync(Member c, object userState) { if ((this.CoachAllotOperationCompleted == null)) { this.CoachAllotOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCoachAllotOperationCompleted); } this.InvokeAsync("CoachAllot", new object[] { c}, this.CoachAllotOperationCompleted, userState); }
void LoadByPaging(int page) { int total; Member m= new Member() { //Id = (int)numberCardNo.Value, CardNo = tbCardNoQ.Text.Trim(), Name = tbName.Text.Trim(), Mobilephone = tbMPhone.Text.Trim(), CardType = cbCardKind.SelectedIndex < 1 ? "" : cbCardKind.SelectedItem.ToString(), CoachId = -1, AdviserId = aid }; ms = wsm.Search(m, aid<=0, ref page, 20, out total); paging1.TotalPages = total; paging1.CurrentPage = page; dataVipInfo.DataSource = ms; }