コード例 #1
0
ファイル: frmVipConsumption.cs プロジェクト: kevinfyc/yoga
 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();
     }
 }
コード例 #2
0
ファイル: frmAddNewVip.cs プロジェクト: kevinfyc/yoga
 /// <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;
 }
コード例 #3
0
ファイル: Reference.cs プロジェクト: kevinfyc/yoga
 /// <remarks/>
 public void ConsumptionScoreAsync(Member c, int score) {
     this.ConsumptionScoreAsync(c, score, null);
 }
コード例 #4
0
ファイル: Reference.cs プロジェクト: kevinfyc/yoga
 /// <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);
 }
コード例 #5
0
ファイル: Reference.cs プロジェクト: kevinfyc/yoga
 /// <remarks/>
 public void GainScoreAsync(Member c, int score) {
     this.GainScoreAsync(c, score, null);
 }
コード例 #6
0
ファイル: Reference.cs プロジェクト: kevinfyc/yoga
 public string ConsumptionScore(Member c, int score) {
     object[] results = this.Invoke("ConsumptionScore", new object[] {
                 c,
                 score});
     return ((string)(results[0]));
 }
コード例 #7
0
ファイル: frmVipConsumption.cs プロジェクト: kevinfyc/yoga
 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");
     }
 }
コード例 #8
0
ファイル: Reference.cs プロジェクト: kevinfyc/yoga
 /// <remarks/>
 public void AddMemberAsync(Member m, byte[] picData) {
     this.AddMemberAsync(m, picData, null);
 }
コード例 #9
0
ファイル: Reference.cs プロジェクト: kevinfyc/yoga
 /// <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);
 }
コード例 #10
0
ファイル: Reference.cs プロジェクト: kevinfyc/yoga
 /// <remarks/>
 public void ChangeAsync(Member m, byte[] picData) {
     this.ChangeAsync(m, picData, null);
 }
コード例 #11
0
ファイル: Reference.cs プロジェクト: kevinfyc/yoga
 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]));
 }
コード例 #12
0
ファイル: Reference.cs プロジェクト: kevinfyc/yoga
 /// <remarks/>
 public void SearchAsync(Member c, bool includeNULLAid, int page, int pageSize) {
     this.SearchAsync(c, includeNULLAid, page, pageSize, null);
 }
コード例 #13
0
ファイル: Reference.cs プロジェクト: kevinfyc/yoga
 /// <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);
 }
コード例 #14
0
ファイル: Reference.cs プロジェクト: kevinfyc/yoga
 /// <remarks/>
 public void PotentialToMemberAsync(Member m, byte[] picData, int pid) {
     this.PotentialToMemberAsync(m, picData, pid, null);
 }
コード例 #15
0
ファイル: Reference.cs プロジェクト: kevinfyc/yoga
 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]));
 }
コード例 #16
0
ファイル: Reference.cs プロジェクト: kevinfyc/yoga
 /// <remarks/>
 public void UpdateAsync(Member m, byte[] picData) {
     this.UpdateAsync(m, picData, null);
 }
コード例 #17
0
ファイル: Reference.cs プロジェクト: kevinfyc/yoga
 public string CoachAllot(Member c) {
     object[] results = this.Invoke("CoachAllot", new object[] {
                 c});
     return ((string)(results[0]));
 }
コード例 #18
0
ファイル: Reference.cs プロジェクト: kevinfyc/yoga
 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]));
 }
コード例 #19
0
ファイル: frmAddNewVip.cs プロジェクト: kevinfyc/yoga
        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");
            }
        }
コード例 #20
0
ファイル: Reference.cs プロジェクト: kevinfyc/yoga
 /// <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);
 }
コード例 #21
0
ファイル: frmVipEnter.cs プロジェクト: kevinfyc/yoga
 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");
     }
 }
コード例 #22
0
ファイル: Reference.cs プロジェクト: kevinfyc/yoga
 /// <remarks/>
 public void CoachAllotAsync(Member c) {
     this.CoachAllotAsync(c, null);
 }
コード例 #23
0
ファイル: frmVipQuery.cs プロジェクト: kevinfyc/yoga
 public frmVipQuery(Member m)
     : this()
 {
     this.memberToView = m;
 }
コード例 #24
0
ファイル: Reference.cs プロジェクト: kevinfyc/yoga
 /// <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);
 }
コード例 #25
0
ファイル: frmVipInfoMgr.cs プロジェクト: kevinfyc/yoga
 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;
 }