private void FormCreateSale_Load(object sender, EventArgs e)
        {
            dateTimePicker1.Value = DateTime.Now;
            tbSalesman.Text       = InfoShareDLL.GetStaffName();
            lbSaleNumber.Text     = "XSD" + DateTime.Now.Year
                                    + DateTime.Now.Month + DateTime.Now.Day
                                    + DateTime.Now.Hour + DateTime.Now.Minute
                                    + DateTime.Now.Second + DateTime.Now.Millisecond.ToString();
            sumPrice          = 0.0;
            tbTotalPrice.Text = sumPrice.ToString("f") + "元";
            DataBaseOperationDLL dl = new DataBaseOperationDLL();

            //将支付方式绑定到支付方式文本框
            list = dl.GetDataInformation("payment_table", "payment_name");//从数据库中获取支付方式
            foreach (string str in list)
            {
                cbPayment.Items.Add(str);
                Console.WriteLine(str);
            }
            //将单位绑定到单位文本框
            list = dl.GetDataInformation("quantifier_table", "quantifier_name");//从数据库中获取单位名称
            foreach (string str in list)
            {
                cbQuantifier.Items.Add(str);
            }
        }
Пример #2
0
        private void FormMain_Load(object sender, EventArgs e)
        {
            string staff = InfoShareDLL.GetStaffName();

            if (staff == null)
            {
                staff = "未绑定";
            }
            label7.Text = "当前登录员工:" + staff + "    登录时间:" + DateTime.Now;
        }