예제 #1
0
 /// <summary>
 /// 加载Grid数据
 /// </summary>
 /// <param name="typeKey">商品类型</param>
 /// <param name="wName">商品名称</param>
 /// <param name="wStock">商品库存</param>
 /// <param name="wPriceTrend">商品</param>
 /// <param name="wAttach"></param>
 private void RefreshGrid(string typeKey, string wName, string wStock, string wPriceTrend, string wAttach)
 {
     if (!string.IsNullOrEmpty(typeKey))
     {
         List <ProductInfo> rtnList      = DBHelper.GetInstance().WareGetAll(typeKey, wName, wStock, wPriceTrend, wAttach);
         PubClass.GetInstance().CurWares = rtnList;
         _productView.RefreshGrid(rtnList);
     }
 }
예제 #2
0
        /// <summary>
        /// 加载Grid数据
        /// </summary>
        private void RefreshGrid(string typeKey)
        {
            if (!string.IsNullOrEmpty(typeKey))
            {
                List <ProductInfo> rtnList      = DBHelper.GetInstance().WareGetAll(typeKey);
                PubClass.GetInstance().CurWares = rtnList;
                _productView.RefreshGrid(rtnList);

                txtWareCount.Caption = string.Format("商品数量:{0}", rtnList != null ? rtnList.Count : 0);
            }
        }
예제 #3
0
        /// <summary>
        /// 根据查询结果显示商品
        /// </summary>
        /// <param name="index"></param>
        private void ShowMyProduct(int index)
        {
            ProductInfo tmpProduct = PubClass.GetInstance().CurWares[index];

            _myProduct = DBHelper.GetInstance().WareGetOne(tmpProduct.ProductID);
            if (_myProduct != null)
            {
                InitUiControlsData();
            }
            else
            {
                MessageBox.Show("提取商品信息失败,请与杀京东开发商WolfStudio工作室联系!", "系统提示");
            }
        }
예제 #4
0
        /// <summary>
        /// 加载Grid数据
        /// </summary>
        private void RefreshGrid()
        {
            List <ProductInfo> rtnList = DBHelper.GetInstance().WareGetAll();

            if (rtnList != null && rtnList.Count > 0)
            {
                PubClass.GetInstance().CurWares = rtnList;
                txtWareCount.Caption = string.Format("商品数量:{0}", rtnList.Count);
                _productView.RefreshGrid(rtnList);
            }
            else
            {
                PubClass.GetInstance().CurWares = null;
                txtWareCount.Caption = string.Format("商品数量:{0}", 0);
            }
        }
예제 #5
0
 /// <summary>
 /// 上一个商品
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnTop_Click(object sender, EventArgs e)
 {
     if (_myProduct != null && PubClass.GetInstance().CurWares != null && PubClass.GetInstance().CurWares.Count > 0)
     {
         int index = PubClass.GetInstance().CurWares.FindIndex(t => t.ProductID == _myProduct.ProductID);
         if (index >= 0)
         {
             index--;
             if (index < 0)
             {
                 index = PubClass.GetInstance().CurWares.Count - 1;
             }
             ShowMyProduct(index);
         }
     }
     else
     {
         if (!string.IsNullOrEmpty(txtID.Text))
         {
             _myProduct = DBHelper.GetInstance().WareGetOne(txtID.Text);
         }
     }
 }
예제 #6
0
파일: PubClass.cs 프로젝트: hanksoft/KillJD
 public static PubClass GetInstance()
 {
     return _instance ?? (_instance = new PubClass());
 }
예제 #7
0
 private void ShowParams()
 {
     PubClass.GetInstance().GetSysParams();
 }
예제 #8
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (cmb1.EditValue == null || cmb2.EditValue == null || cmb3.EditValue == null)
            {
                MessageBox.Show("配送区域不能为空!", "系统提示");
                return;
            }
            SysParams.UserName   = txtUserName.Text;
            SysParams.UserPass   = string.IsNullOrEmpty(txtUserPass.Text) ? "123456" : PassWordHelper.GetInstance().DesStr(txtUserPass.Text, "isarahan", "wolfstud");
            SysParams.JDUserName = txtJDUserName.Text;
            SysParams.JDUserPass = string.IsNullOrEmpty(txtJDUserPass.Text) ? "123456" : PassWordHelper.GetInstance().DesStr(txtJDUserPass.Text, "isarahan", "wolfstud");

            SysParams.AllowAutoGetWebUrl    = chkAllowAutoGetWebUrl.Checked;
            SysParams.AllowAutoGetFocusWare = chkAllowAutoGetFocusWare.Checked;
            SysParams.AutoGetFocusTime      = cmbFocusTime.Text;

            SysParams.AllowAutoGC = true;

            #region Gather Params
            SysParams.GatherJDWare = chkGatherJD.Checked;
            SysParams.GatherQJWare = chkGatherQJ.Checked;
            SysParams.Gather3Ware  = chkGather3.Checked;

            SysParams.GetWareBaseInfo    = chkWareBaseInfo.Checked;
            SysParams.GetWarePrice       = chkWarePrice.Checked;
            SysParams.GetWareStock       = chkWareStock.Checked;
            SysParams.GetWarePostMessage = chkWarePostMessage.Checked;
            SysParams.GetWareCoupon      = chkWareCopon.Checked;
            SysParams.GetWarePicture     = chkWarePicture.Checked;
            #endregion Gather Params

            #region Monitor Params
            SysParams.AllowAutoUpdateWareInfo = chkAllowAutoUpdateWareinfo.Checked;
            SysParams.AutoUpdateTime          = cmbUpdateTime.Text;

            SysParams.AllowGetPrice       = chkAllowGetPrice.Checked;
            SysParams.AllowGetMobilePrice = chkAllowGetAPPPrice.Checked;
            SysParams.AllowGetQQPrice     = chkAllowGetQQPrice.Checked;
            SysParams.AllowGetWXPrice     = chkAllowGetWXPrice.Checked;

            SysParams.AllowGetStock       = chkAllowGetStock.Checked;
            SysParams.AllowGetCoupon      = chkAllowGetCoupon.Checked;
            SysParams.AllowGetPostMessage = chkAllowGetPostMessage.Checked;
            SysParams.AllowGetPromo       = chkAllowGetPromo.Checked;
            #endregion Monitor Params

            SysParams.Level1Area = cmb1.Text;
            SysParams.Level2Area = cmb2.Text;
            SysParams.Level3Area = cmb3.Text;

            int id1 = (int)cmb1.EditValue;
            int id2 = (int)cmb2.EditValue;
            int id3 = (int)cmb3.EditValue;
            SysParams.DispathArea = string.Format("{0}_{1}_{2}_0", id1, id2, id3);

            SysParams.AllowRunAtSystemStart  = chkAllowRunAtSystemStart.Checked;
            SysParams.AllowLoginVerify       = chkAllowLoginVerify.Checked;
            SysParams.CheckNetState          = chkCheckNetState.Checked;
            SysParams.AllowAutoUpdateVersion = chkAllowAutoUpdateVersion.Checked;

            PubClass.GetInstance().AssemblyParams();
            this.FindForm().Close();
        }
예제 #9
0
 private void InitSysparams()
 {
     PubClass.GetInstance().GetSysParams();
     RefreshStatubar();
 }
예제 #10
0
파일: PubClass.cs 프로젝트: tliangA/KillJD
 public static PubClass GetInstance()
 {
     return(_instance ?? (_instance = new PubClass()));
 }