Exemple #1
0
 private void DoSingleWalletRegister(Customer c, int handle)
 {
     BCCHelper.ResetPackHandle(handle);
     BCCHelper.SetIntFieldByName(handle, 0, "lvol0", c.CustomerId);  //客户号
     //BCCHelper.SetIntFieldByName(handle, 0, "lvol1", 888);  //终端号
     if (BCCHelper.SetRequestType(handle, 846331))
     {
         int errCode = 0;
         int retCode = -1;
         StringBuilder errMsg = new StringBuilder(255);
         bool requestStatus = BCCHelper.CallRequest(handle, Global.Drtp_NO, Global.Drtp_Branch, Global.BCC_BaseFunction, 5000, ref errCode, errMsg);
         if (!requestStatus)
         {
             Global.Logger.Warn(string.Format("BCCHelper.CallRequest[846331] failed! errorCode ={0} and errMsg= {1}", errCode, errMsg));
             return;
         }
         BCCHelper.GetRetCode(handle, ref retCode);
         //int ser=0;
         //BCCHelper.GetIntFieldByName(handle, 0, "scust_no", ref ser);
         string ser = BCCHelper.GetStringFieldByName(handle, 0, "scust_no");
         string pass = BCCHelper.GetStringFieldByName(handle, 0, "scust_limit");
         string msg = BCCHelper.GetStringFieldByName(handle, 0, "vsmess");
         if (retCode != 0)
         {
             //fail to wallet registration
             frmLoading.NotifyIndicator(string.Format("failed ,customer#{0}:{1}", c.CustomerId, errMsg));
             Global.Logger.Warn(string.Format(" failed ,Customerid ={0} and errMsg= {1}", c.CustomerId, msg));
         }
         else
         {
             //succuess to wallet registration
             Customer target = customers.Find(delegate(Customer o)
              {
                  return o.CustomerId == c.CustomerId;
              });
             //target.NetAccFlag = "1";
             //target.NetAccFlagDes = "已开通";
             Global.Logger.Info(string.Format("succ ,Customerid# = {0} and Wallet#= {1} ", c.CustomerId, ser));
             frmLoading.NotifyIndicator(string.Format("Customer#{0},ser#:{1} ", c.CustomerId, ser));
         }
     }
     else
     {
         Global.Logger.Info("BCCHelper.SetRequestType[846331] failed!");
     }
     //frmLoading.NotifyIndicator(customers.Count.ToString());
 }
Exemple #2
0
        private void AddCustomerToGrid(Customer c)
        {
            DataGridViewRow r = new DataGridViewRow();
            gvCust.Rows.Add(r);

            DataGridViewCell c1 = new DataGridViewCheckBoxCell();
            c1.Value = false;
            r.Cells[this.colCheck.Name] = c1;

            DataGridViewCell c2 = new DataGridViewTextBoxCell();
            c2.Value = c.CustomerId;
            r.Cells[this.CustomerId.Name] = c2;

            DataGridViewCell c3 = new DataGridViewTextBoxCell();
            c3.Value = c.CustomerName;
            r.Cells[this.CustomerName.Name] = c3;
        }