Example #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmProductForceGunDetailH frm = new frmProductForceGunDetailH();

            if (frm.ShowDialog() == DialogResult.OK)
            {
                LoadInfoSearch();
            }
        }
Example #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;
            frmProductForceGunDetailH frm = new frmProductForceGunDetailH();

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