Exemplo n.º 1
0
        private void sbtnMod_Click(object sender, System.EventArgs e)
        {
            //修改
            //修改
            if (this.dataGrid1.CurrentRowIndex < 0)
            {
                MessageBox.Show("请选择要修改的领料单", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            string strBillNo = this.dataGrid1[this.dataGrid1.CurrentRowIndex, 0].ToString();
            string strsql    = "";
            bool   IsHis     = false;

            if (this.checkBox1.Checked)
            {
                strsql = "select * from tbBillOfMaterialsHis where cnvcbillno='" + strBillNo + "'";
                IsHis  = true;
            }
            else
            {
                strsql = "select * from tbBillOfMaterials where cnvcbillno='" + strBillNo + "'";
            }
            DataTable dt = Helper.Query(strsql, false);

            Entity.BillOfMaterials bom = new CMSM.Entity.BillOfMaterials(dt);
            frmBillOfMaterialsAdd  frm = new frmBillOfMaterialsAdd();

            frm.BOM   = bom;
            frm.Flag  = OperFlag.MOD;
            frm.IsHis = IsHis;
            frm.ShowDialog();
            this.DgBind();
        }
Exemplo n.º 2
0
        private void sbtnAdd_Click(object sender, System.EventArgs e)
        {
            Form frmadd = new frmBillOfMaterialsAdd();

            frmadd.ShowDialog();
        }