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");
     }
 }
 private void addReccord()
 {
     if (IsValidate())
     {
         setObject();
         HANDLER.ShowMessage(txtMessage, HandlerToDB.InsertOrUpdate(ConfigFormNames.COMPANY, ConfigQueryModes.INSERT) + " " + ConfigApp.INSERT_MESSAGE);
         txtCCode.AdvanceText = HandlerToDB.GetNewID(ConfigFormNames.COMPANY).ToString();
         FormReset();
     }
 }
 private void updateRecord()
 {
     if (isFormValidated())
     {
         setObject();
         HANDLER.ShowMessage(txtMessage, HandlerToDB.InsertOrUpdate(ConfigFormNames.PRODUCT_NEW, ConfigQueryModes.UPDATE) + " " + ConfigApp.UPDATE_MESSAGE);
         calOnLoad();
     }
     else
     {
         HANDLER.ShowMessage(txtMessage, ConfigApp.NOT_VALID_FORM_MESSAGE);
     }
 }
 private void addRecord()
 {
     if (isFormValied())
     {
         setObjects();
         HANDLER.ShowMessage(txtMessage, HandlerToDB.InsertOrUpdate(ConfigFormNames.SALES_MAN_NEW, ConfigQueryModes.INSERT) + " " + ConfigApp.INSERT_MESSAGE);
         txtSalesManCode.AdvanceText = HandlerToDB.GetNewID(ConfigFormNames.SALES_MAN_NEW).ToString();
         resetForm();
     }
     else
     {
         HANDLER.ShowMessage(txtMessage, ConfigApp.NOT_VALID_FORM_MESSAGE);
     }
 }
 private void addRecord()
 {
     if (isValid())
     {
         OBJ_Zone.ZONE_NAME = txtZName.AdvanceText;
         HANDLER.ShowMessage(txtMessage, HandlerToDB.InsertOrUpdate(ConfigFormNames.ZONE_NEW, ConfigQueryModes.INSERT) + " " + ConfigApp.INSERT_MESSAGE);
         txtZCode.AdvanceText = HandlerToDB.GetNewID(ConfigFormNames.ZONE_NEW).ToString();
         FormReset();
     }
     else
     {
         HANDLER.ShowMessage(txtMessage, ConfigApp.NOT_VALID_FORM_MESSAGE);
     }
 }
Example #6
0
 private void btnDel_Click(object sender, EventArgs e)
 {
     if (isValid())
     {
         OBJ_Zone.ZONE_CODE = Convert.ToInt32(txtZCode.AdvanceText);
         HANDLER.ShowMessage(txtMessage, HandlerToDB.InsertOrUpdate(ConfigFormNames.ZONE_NEW, ConfigQueryModes.DELETE) + " " + ConfigApp.DELETE_MESSAGE);
         FormReset();
         DataGrid.DataSource = HandlerToDB.GetDataTable(ConfigSelectQueries.ALL_ZONE);
     }
     else
     {
         HANDLER.ShowMessage(txtMessage, ConfigApp.NOT_VALID_FORM_MESSAGE);
     }
 }
 private void saveRecord()
 {
     if (isValid())
     {
         OBJ_Zone.ZONE_NAME = txtName.AdvanceText;
         OBJ_Zone.ZONE_CODE = Convert.ToInt32(txtCode.AdvanceText);
         HANDLER.ShowMessage(txtMessage, HandlerToDB.InsertOrUpdate(ConfigFormNames.ZONE_NEW, ConfigQueryModes.UPDATE) + " " + ConfigApp.UPDATE_MESSAGE);
         DataGrid.DataSource = HandlerToDB.GetDataTable(ConfigSelectQueries.ALL_ZONE);
         FormReset();
     }
     else
     {
         HANDLER.ShowMessage(txtMessage, ConfigApp.NOT_VALID_FORM_MESSAGE);
     }
 }
 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);
     }
 }