コード例 #1
0
        /*    buypro.BuyTime = DateTime.Now.ToString();
         *      buypro.Productaddr = product.Productaddr;
         *      buypro.Productdru = product.Productdru;
         *      buypro.Productid = product.Productid;
         *      buypro.Productname = product.Productname;
         *      buypro.Productnum = product.Productnum;
         *      buypro.Productpd = product.Productpd;
         *      buypro.Productpprice = product.Productpprice;
         *      buypro.Productprice = product.Productprice;
         *      buypro.Productpristata = product.Productstata;
         *      buypro.Producttype = product.Producttype;
         *      buyList.Add(buypro);*/

        public Form_payFor(float p, Form_BuyBK f, List <BuyFz> tlist)
        {
            InitializeComponent();
            price             = p;
            this.tex_int.Text = price.ToString("0.00");
            this.tex_in.Select();
            this.CenterToParent();
            fd = f;
            for (int i = 0; i < tlist.Count; i++)
            {
                BuyBk bb = new BuyBk();
                bb.BuyFrom    = "system";
                bb.Buyprice   = tlist[i].Price.ToString();
                bb.Buyproduct = tlist[i].Pname;
                bb.Buytime    = DateTime.Now.ToString();
                bb.Count      = tlist[i].Count;
                blist.Add(bb);
            }
        }
コード例 #2
0
        public static List <BuyBk> GetAllBuyBk()
        {
            string          sql  = "select * from buy_bk";
            OleDbDataReader dr   = Dbhelper.ExecuteReader(sql);
            List <BuyBk>    list = new List <BuyBk>();

            while (dr.Read())
            {
                BuyBk by = new BuyBk();
                by.Buyid      = int.Parse(dr[0].ToString());
                by.Buyproduct = dr[1].ToString();
                by.Buyprice   = dr[2].ToString();
                by.Buytime    = dr[3].ToString();
                by.Count      = int.Parse(dr[4].ToString());
                by.BuyFrom    = dr[5].ToString();
                list.Add(by);
            }
            dr.Close();
            return(list);
        }
コード例 #3
0
        public static List <BuyBk> GetAllBuyBkByTime(string begintime, string endtime)
        {
            string          sql  = string.Format("select * from buy_bk where buy_time between #{0}# and #{1}#", begintime, endtime);
            OleDbDataReader dr   = Dbhelper.ExecuteReader(sql);
            List <BuyBk>    list = new List <BuyBk>();

            while (dr.Read())
            {
                BuyBk by = new BuyBk();
                by.Buyid      = int.Parse(dr[0].ToString());
                by.Buyproduct = dr[1].ToString();
                by.Buyprice   = dr[2].ToString();
                by.Buytime    = dr[3].ToString();
                by.Count      = int.Parse(dr[4].ToString());
                by.BuyFrom    = dr[5].ToString();
                list.Add(by);
            }
            dr.Close();
            return(list);
        }
コード例 #4
0
        public static int AddByBk(BuyBk bk)
        {
            string sql = string.Format("insert into buy_bk(Buy_product,Buy_Price,Buy_Time,Buy_Count,buy_from) values('{0}','{1}','{2}','{3}','{4}')", bk.Buyproduct, bk.Buyprice, bk.Buytime, bk.Count, bk.BuyFrom);

            return(Dbhelper.ExecuteNonQuery(sql));
        }