Exemple #1
0
        private void BindDrop()
        {
            int total = 0;

            List <Employee> list = EmployeeDAL.Getlist("销售部", 3, out total);

            if (list != null && list.Count > 0)
            {
                cbxemployee.DataSource    = list;
                cbxemployee.DisplayMember = "EmpName";
                cbxemployee.ValueMember   = "EmpId";
            }
            List <Goods> goodslist = GoodsDAL.Getlist("", 0, out total);

            if (goodslist.Count > 0)
            {
                diclist = goodslist.ToDictionary(x => x.GoodsId);
            }
            List <Dic> dickeylist = DicDAL.Getlist("", 0, out total);

            if (dickeylist != null && dickeylist.Count > 0)
            {
                dickeys = dickeylist.ToDictionary(x => x.KeyId);
            }
        }
Exemple #2
0
        public void BinddgvData()
        {
            int          total     = 0;
            List <Goods> goodslist = GoodsDAL.Getlist("", 0, out total);

            if (goodslist.Count > 0)
            {
                dicIdlist = goodslist.ToDictionary(x => x.GoodsId);
            }
            if (goodslist != null && goodslist.Count > 0)
            {
                dgvlist.RowCount = goodslist.Count;
                for (int i = 0; i < goodslist.Count; i++)
                {
                    dgvlist[0, i].Value = goodslist[i].GoodsId;
                    dgvlist[1, i].Value = dicIdlist[goodslist[i].GoodsId].GoodsName;
                    dgvlist[2, i].Value = diclist.ContainsKey(goodslist[i].KeyBrandId) ? diclist[goodslist[i].KeyBrandId].KeyName.ToString() : "";
                    dgvlist[3, i].Value = diclist.ContainsKey(goodslist[i].KeyTypeId) ? diclist[goodslist[i].KeyTypeId].KeyType.ToString() : "";
                    dgvlist[4, i].Value = diclist.ContainsKey(goodslist[i].KeyUnitId) ? diclist[goodslist[i].KeyUnitId].KeyName.ToString() : "";
                    dgvlist[5, i].Value = suplierIdlist.ContainsKey(goodslist[i].SupplierId) ? suplierIdlist[goodslist[i].SupplierId].Name.ToString() : "";
                    dgvlist[6, i].Value = goodslist[i].WarnNum;
                }
            }
            else
            {
                dgvlist.Rows.Clear();
            }
        }
Exemple #3
0
        private void binddata()
        {
            tv.Nodes.Clear();

            tv.ImageList = this.imglist;
            System.Windows.Forms.TreeNode TN = new System.Windows.Forms.TreeNode("商品名称", 0, 1);

            int          total = 0;
            List <Goods> list  = GoodsDAL.Getlist("", 0, out total);

            if (list != null && list.Count > 0)
            {
                foreach (var item in list)
                {
                    TreeNode tr = new TreeNode();
                    tr.Name               = "";
                    tr.Text               = item.GoodsName.ToString();
                    tr.Tag                = item.GoodsId.ToString() + "," + item.KeyUnitId + "," + item.WarnNum;
                    tr.ImageIndex         = 0;
                    tr.SelectedImageIndex = 1;
                    TN.Nodes.Add(tr);
                }
            }



            tv.Nodes.Add(TN);

            tv.ExpandAll();
        }
Exemple #4
0
        private void initdata()
        {
            int          total     = 0;
            List <Goods> goodslist = GoodsDAL.Getlist("", 0, out total);

            if (goodslist.Count > 0)
            {
                diclist = goodslist.ToDictionary(x => x.GoodsId);
            }
        }
Exemple #5
0
        private void BindDrop()
        {
            int total = 0;


            List <Goods> goodslist = GoodsDAL.Getlist("", 0, out total);

            if (goodslist.Count > 0)
            {
                diclist = goodslist.ToDictionary(x => x.GoodsId);
            }
            List <Dic> dickeylist = DicDAL.Getlist("", 0, out total);

            if (dickeylist != null && dickeylist.Count > 0)
            {
                dickeys = dickeylist.ToDictionary(x => x.KeyId);
            }
        }
Exemple #6
0
        private void initKeylist()
        {
            List <Dic> dickeylist = DicDAL.Getlist("", 0, out total);

            if (dickeylist != null && dickeylist.Count > 0)
            {
                dickeys = dickeylist.ToDictionary(x => x.KeyId);
            }

            List <Goods> goodslist = GoodsDAL.Getlist("", 0, out total);

            if (goodslist.Count > 0)
            {
                diclist = goodslist.ToDictionary(x => x.GoodsId);
            }

            List <Ware> wlist = WareDAL.Getlist();

            if (wlist.Count > 0)
            {
                warelist = wlist.ToDictionary(x => x.WareId);
            }
        }