Example #1
0
        private void EmployeeReport_Load(object sender, EventArgs e)
        {
            G_OperationForm.BindComboBox("SELECT * FROM tb_Post", cbxPost, "PostName");  //绑定ComboBox控件
            G_OperationForm.BindComboBox("SELECT * FROM tb_Department", cbxDepName, "DepName");

            this.cbxSex.SelectedIndex = 0;  //设定默认项
        }
Example #2
0
        private void ReGoods_Load(object sender, EventArgs e)
        {
            this.timer1.Start();
            string P_Str_cmdtxt = "SELECT ReGoodsID as 退货ID,GoodsID as 进货ID,ReGoodsName as 图书名称,Name as 顾客姓名,ReGoodsTime as 退货日期";

            P_Str_cmdtxt += ",ReGoodsNum as 退货数量,ReGoodsUnit as 图书单位,ReGoodsSpec as 图书规格,ReGoodsPrice as 销售价格,NeedPay as 应付金额";
            P_Str_cmdtxt += ",HasPay as 实付金额,ReGoodsResult as 退货原因 FROM v_ReGoods WHERE ReGoodsSort='1'";
            this.dgvReGoodsInfo.DataSource = G_SqlClass.GetDs(P_Str_cmdtxt).Tables[0];
            G_OperationForm.BindComboBox("SELECT * FROM tb_Unit", cbxUnit, "UnitName");
            G_OperationForm.BindComboBox("SELECT * FROM tb_Customer", cbxCustomerName, "Name");
        }
Example #3
0
        private void ReGoods_Load(object sender, EventArgs e)
        {
            this.timer1.Start();
            string P_Str_cmdtxt = "SELECT ReGoodsID as 退货ID,GoodsID as 进货ID,CompanyName as 供应商名称,ReGoodsName as 图书名称,ReGoodsTime as 退货日期,ReGoodsNum as 退货数量";

            P_Str_cmdtxt += ",ReGoodsUnit as 图书单位,ReGoodsSpec as 图书规格,ReGoodsPrice as 进货价格,NeedPay as 应付金额,HasPay as 实付金额,ReGoodsResult as 退货原因";
            P_Str_cmdtxt += " FROM tb_ReGoods WHERE ReGoodsSort='0'";
            this.dgvReGoodsInfo.DataSource = G_SqlClass.GetDs(P_Str_cmdtxt).Tables[0];
            G_OperationForm.BindComboBox("SELECT * FROM tb_Unit", cbxUnit, "UnitName"); //绑定ComboBox控件
            G_OperationForm.BindComboBox("SELECT DISTINCT * FROM tb_Company", cbxCompanyName, "CompanyName");
        }
Example #4
0
        private void SellGoods_Load(object sender, EventArgs e)
        {
            this.timer1.Start();
            string P_Str_cmdtxt = "SELECT SellID,GoodsID as 图书ID,[Name] as 销售员姓名,GoodsName as 图书名称";

            P_Str_cmdtxt += ",GoodsNum as 销售数量,GoodsUnit as 图书单位,GoodsSpec as 图书规格,GoodsTime as 销售时间";
            P_Str_cmdtxt += ",GoodsPrice 进货价格,SellPrice as 销售价格,NeedPay as 应收金额,HasPay as 实收金额,Remark as 备注";
            P_Str_cmdtxt += " FROM v_UserSell";
            this.dgvSellInfo.DataSource = G_SqlClass.GetDs(P_Str_cmdtxt).Tables[0];
            G_OperationClass.BindComboBox("SELECT * FROM tb_Customer", cbxCustomerName, "Name");
            G_OperationClass.BindComboBox("SELECT * FROM tb_Unit", cbxUnit, "UnitName");
            G_OperationClass.BindComboBox("SELECT * FROM tb_User", cbxSellName, "Name");
        }
Example #5
0
        private void GoodsIn_Load(object sender, EventArgs e)
        {
            string cmdtxt = "SELECT GoodsID as 图书ID,GoodsName as 图书名称,GoodsTime as 进货日期,CompanyName as 供应商名称";

            cmdtxt += ",GoodsNum as 进货数量,GoodsUnit as 图书单位,GoodsPrice as 图书进价,DepotName as 所属仓库,GoodsSpec as 图书规格";
            cmdtxt += ",SellPrice as 销售价格,NeedPay as 应付金额,HasPay as 实付金额,Remark as 备注 FROM tb_Goods";
            this.dgvGoodsInfo.DataSource = G_SqlClass.GetDs(cmdtxt).Tables[0];

            G_OperationForm.BindComboBox("SELECT * FROM tb_Company", cbxCompanyName, "CompanyName");  //绑定ComboBox控件
            G_OperationForm.BindComboBox("SELECT * FROM tb_Unit", cbxUnit, "UnitName");
            G_OperationForm.BindComboBox("SELECT * FROM tb_Depot", cbxDepot, "DepotSort");
            G_OperationForm.BindComboBox("SELECT * FROM tb_User", cbxEmployeeName, "Name");
        }
Example #6
0
        private void EmployeeInfo_Load(object sender, EventArgs e)
        {
            string cmdtxt = "SELECT UserID as 员工ID,Name as 员工姓名,Sex as 员工性别,Birthday as 出生日期,Department as 所属部门,Post as 所在职位";

            cmdtxt += ",PhoneH as 家庭电话,PhoneM as 手机号码,Address as 家庭住址 FROM tb_User";
            this.dgvUserInfo.DataSource = G_SqlClass.GetDs(cmdtxt).Tables[0];
            G_OperationForm.BindComboBox("SELECT * FROM tb_Post", cbxPost, "PostName");
            G_OperationForm.BindComboBox("SELECT * FROM tb_Department", cbxDepartment, "DepName");

            this.cbxSex.SelectedIndex       = 0; //设置默认选项
            this.cbxCondition.SelectedIndex = 0;

            this.dgvUserInfo.Columns[0].Visible = false;  //设置DataGridView控件隐藏列
        }
Example #7
0
        private void SysUser_Load(object sender, EventArgs e)
        {
            string P_Str_cmdtxt = "SELECT Name FROM tb_User";

            this.listBox1.DataSource    = G_SqlClass.GetDs(P_Str_cmdtxt).Tables[0];
            this.listBox1.DisplayMember = "Name";
            this.listBox1.ValueMember   = "Name";

            this.listBox1.SelectedIndex = 0;
            G_WinFormClass.BindComboBox("SELECT DISTINCT postname FROM tb_post", cbxLogin, "postname");
        }
Example #8
0
        private void ChangeGoods_Load(object sender, EventArgs e)
        {
            this.timer1.Start();
            string P_Str_cmdtxt = "SELECT StockTempID,UserID,GoodsID as 图书ID,GoodsName as 图书名称";

            P_Str_cmdtxt += ",FDepotName 调出仓库,LDepotName as 调入仓库,CGoodsTime as 调动时间";
            P_Str_cmdtxt += ",StockNum as 库存数量,CGoodsNum as 调出数量 FROM tb_StockTemp";
            this.dgvChangeInfo.DataSource         = G_SqlClass.GetDs(P_Str_cmdtxt).Tables[0];
            this.dgvChangeInfo.Columns[0].Visible = false;                             //控制DataGridView中列的状态
            this.dgvChangeInfo.Columns[1].Visible = false;
            G_WinFormClass.BindComboBox("SELECT * FROM tb_Depot", cbxIn, "DepotSort"); //绑定ComboBox控件
        }