private void txtProductId_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         MTN_PRODUCT_LIST frm = new MTN_PRODUCT_LIST();
         frm.SelectVisible = true;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             dalProductList dal = new DAL.dalProductList();
             modProductList mod = dal.GetItem(Util.retValue1, out Util.emsg);
             if (mod != null)
             {
                 txtProductId.Text   = mod.ProductId;
                 txtProductName.Text = mod.ProductName;
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Beispiel #2
0
        private void btnProduct_Click(object sender, EventArgs e)
        {
            MTN_PRODUCT_LIST frm = new MTN_PRODUCT_LIST();

            frm.SelectVisible = true;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                dalProductList dalpdt = new dalProductList();
                modProductList modpdt = dalpdt.GetItem(Util.retValue1, out Util.emsg);
                txtProductName.Tag  = modpdt.ProductId;
                txtProductName.Text = modpdt.ProductName;
                txtUnitNo.Text      = modpdt.UnitNo;
                if (modpdt.SizeFlag == 1)
                {
                    txtSize.Enabled = true;
                    txtSize.Text    = "0";
                }
                else
                {
                    txtSize.Enabled = false;
                    txtSize.Text    = "1";
                }
                txtQty.Focus();
            }
        }
Beispiel #3
0
 private void mnuAdd_Click(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         MTN_PRODUCT_LIST frm = new MTN_PRODUCT_LIST();
         frm.SelectVisible = true;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             dalProductList dal = new dalProductList();
             modProductList mod = dal.GetItem(Util.retValue1, out Util.emsg);
             if (mod != null)
             {
                 DataGridViewRow row = new DataGridViewRow();
                 row.CreateCells(DBGrid);
                 row.Cells[0].Value = mod.ProductId;
                 row.Cells[1].Value = mod.ProductName;
                 row.Cells[2].Value = mod.Specify;
                 row.Cells[3].Value = mod.UnitNo;
                 row.Cells[4].Value = mod.Brand;
                 row.Cells[5].Value = 1;
                 row.Cells[6].Value = 0;
                 row.Cells[7].Value = "";
                 row.Height         = 40;
                 DBGrid.Rows.Add(row);
                 row.Dispose();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Beispiel #4
0
        private void btnProductList_Click(object sender, EventArgs e)
        {
            MTN_PRODUCT_LIST frm = new MTN_PRODUCT_LIST();

            frm.ShowDialog();
        }