示例#1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmCheckForceDetail frm = new frmCheckForceDetail();

            if (frm.ShowDialog() == DialogResult.OK)
            {
                LoadInfoSearch();
            }
        }
示例#2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            int ID = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colID));

            if (ID == 0)
            {
                return;
            }
            ProductCheckForceModel model = ProductCheckForceBO.Instance.FindByPK(ID) as ProductCheckForceModel;

            if (model == null)
            {
                return;
            }
            string ProductCode = TextUtils.ToString(grvData.GetFocusedRowCellValue(colProductCode));

            if (string.IsNullOrEmpty(ProductCode.Trim()))
            {
                return;
            }
            Expression expression = new Expression("ProductCode", ProductCode);
            ArrayList  arrProduct = ProductBO.Instance.FindByExpression(expression);

            if (arrProduct.Count == 0)
            {
                return;
            }
            ProductModel        product = arrProduct[0] as ProductModel;
            frmCheckForceDetail frm     = new frmCheckForceDetail();

            frm.model = model;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                LoadInfoSearch();
            }
        }