Exemple #1
0
        private void frm_原材料编辑_Load(object sender, EventArgs e)
        {
            MinimizeBox     = false;
            MaximizeBox     = false;
            FormBorderStyle = FormBorderStyle.Fixed3D;

            txt_gonghao.set_title("工号");
            txt_money.set_title("金额");
            txt_weight.set_title("重量");

            txt_money.set_type(2);
            txt_weight.set_type(2);

            Text         = "原材料编辑    部门:" + deptname + "  代码:" + deptcode;
            lab_pzh.Text = "凭证号:" + 凭证.凭证号;

            材质类别表DAL dal = new 材质类别表DAL();

            cmb_type.DataSource    = dal.GetDataTable();     //GetDataTable
            cmb_type.DisplayMember = "材质名称";
            cmb_type.ValueMember   = "材质类别";

            if (!addflag)
            {
                txt_gonghao.set_value(凭证.工作令号);
                txt_weight.set_value(凭证.重量.ToString());
                txt_money.set_value(凭证.金额.ToString());

                cmb_type.SelectedValue = 凭证.材质;
            }
        }
Exemple #2
0
        private void frm_import_excel_Load(object sender, EventArgs e)
        {
            System.Data.DataTable tb;
            材质类别表DAL dal = new 材质类别表DAL();

            if (_isSale)
            {
                tb = dal.GetDataTableForSale();
            }
            else
            {
                tb = dal.GetDataTable();
            }

            clsItem mycls1;

            foreach (DataRow myrow in tb.Rows)
            {
                mycls1       = new clsItem();
                mycls1.name  = myrow["材质名称"].ToString();
                mycls1.value = myrow["材质类别"].ToString();
                cmb_type.Items.Add(mycls1);
            }

            cmb_type.ValueMember   = "value";
            cmb_type.DisplayMember = "name";

            Text = "数据导入   部门:" + deptname + "  部门代码:" + deptcode;
        }