Exemplo n.º 1
0
 private void addRecord()
 {
     if (CurrentStage == Stage.locked)
     {
         if (formValidate())
         {
             setObjects();
             HANDLER.ShowMessage(txtMessage, HandlerToDB.InsertOrUpdate(ConfigFormNames.STOCK_NEW, ConfigQueryModes.INSERT) + " " + ConfigApp.INSERT_MESSAGE);
             // callOnLoad();
             clearForm();
             txtStockCode.AdvanceText = HandlerToDB.GetNewID(ConfigFormNames.STOCK_NEW).ToString();
             DataGrid.DataSource = HandlerToDB.GetDataTableWhere(ConfigSelectQueryModes.CURRENT_INVOICE_MODE);
             txtProCode.AdvanceText = "0";
             txtBatchNo.Enabled = true;
             txtBatchNo.Focus();
         }
         else
         {
             HANDLER.ShowMessage(txtMessage, ConfigApp.NOT_VALID_FORM_MESSAGE);
         }
     }
     else
     {
         HANDLER.ShowMessage(txtMessage, "Enter Invoice No To Proced");
     }
 }
Exemplo n.º 2
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     if (formValidate())
     {
         setObjects();
         HANDLER.ShowMessage(txtMessage, HandlerToDB.InsertOrUpdate(ConfigFormNames.SALES, ConfigQueryModes.INSERT) + " " + ConfigApp.INSERT_MESSAGE);
         currentSgate = Stage.Locked;
         clearForm();
         btnNewInvoice.Enabled    = true;
         txtSalesNo.AdvanceText   = HandlerToDB.GetNewID(ConfigFormNames.SALES).ToString();
         salesDataGrid.DataSource = HandlerToDB.GetDataTableWhere(ConfigSelectQueryModes.CURRENT_SALE_INVOICE_MODE);
     }
     else
     {
         HANDLER.ShowMessage(txtMessage, ConfigApp.NOT_VALID_FORM_MESSAGE);
     }
 }