예제 #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                if (cmbTyp.Text == "Lot Matrix")
                {
                    frmItemAdd FRMUNIT = new frmItemAdd();
                    FRMUNIT.Show();
                }
                else
                {
                    if (PRODUCTID == 0)
                    {
                        string strQuery = string.Empty;
                        {
                            strQuery = "insert into product(ID,PRODUCTNAME,CATID,TYPE,UNITCOST,BARCODE,UNITPRICE,PACKQTY,SELLQTY,TAX1,TAX2,QTYONHAND,SUPPID,ISTOREID,CREATEDATE) values ('" + txtPId.Text + "','" + txtPName.Text + "','" + cmbCatId.Text + "','" + cmbTyp.Text + "','" + txtUnitCost.Text + "','" + txtBarcode.Text + "','" + txtUnitPrice.Text + "','" + txtPacketQty.Text + "','" + txtSellQty.Text + "','" + txtTax1.Text + "','" + txtTax2.Text + "','" + txtQtyOnHand.Text + "','" + cmbSupplId.Text + "','" + txtStoreId.Text + "','" + strDateTime + "')";

                            dLib.ExecuteNonQuery(AgroFUN.gblConnString, strQuery);
                            LoadGrid();
                        }
                    }
                }
                ClearValue();
            }

            catch (Exception ex)
            {
                AgroFUN.SystemLog("Save:" + ex.Message.ToString());
            }
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            frmItemAdd FRMUNIT = new frmItemAdd();

            FRMUNIT.Show();
        }