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 callOnLoad()
 {
     HandlerToDB.SetComboBox(combMedType, ConfigFormNames.PRODUCT_NEW);
     HandlerToDB.SetComboBox(combSTMode, ConfigSelectQueries.SALES_TAX_MODE);
     HandlerToDB.SetComboBox(combDisMode, ConfigSelectQueries.DISCOUNT_MODE);
     stockDataGrid.DataSource    = stockREC = HandlerToDB.GetDataTable(ConfigSelectQueries.ALL_STOCK);
     proDataGrid.DataSource      = ProREC = HandlerToDB.GetDataTable(ConfigSelectQueries.ALL_PRODUCTS);
     ComDataGrid.DataSource      = companyList = HandlerToDB.GetDataTable(ConfigSelectQueries.ALL_COMPANY);
     SalesManDataGrid.DataSource = smREC = HandlerToDB.GetDataTable(ConfigSelectQueries.ALL_SALES_MAN);
     cusDataGrid.DataSource      = cusREC = HandlerToDB.GetDataTable(ConfigSelectQueries.ALL_CUSTOMER);
     ModeID  = false;
     cityRec = new DataTable();
     CityDataGrid.DataSource = cityRec = HandlerToDB.GetDataTable(ConfigSelectQueries.ALL_CITY);
     // cusDataGrid.Focus();
     CurrentStage      = Stage.One;
     Stage1.Visible    = true;
     lblSearchPro.Text = ConfigApp.SEARCH_MODE_ID_MESSAGE;
     ModeIDPro         = true;
     lblMode.Text      = ConfigApp.SEARCH_MODE_ID_MESSAGE;
     lblSearchCom.Text = ConfigApp.SEARCH_MODE_ID_MESSAGE;
     ModeID            = true;
     //CityDataGrid.Focus();
     dateInvoice.CustomFormat = ConfigApp.DATETIME_FORMATE;
     txtSalesNo.AdvanceText   = HandlerToDB.GetNewID(ConfigFormNames.SALES).ToString();
     txtInvoice.AdvanceText   = HandlerToDB.GetNewID(ConfigSelectQueryModes.MAX_INVOICE).ToString();
     txtSearch.Focus();
 }
Exemplo n.º 3
0
 private void callOnLoad()
 {
     DataGrid.DataSource = HandlerToDB.GetDataTable(ConfigSelectQueries.ALL_CUSTOMER);
     ModeID  = false;
     cityRec = new DataTable();
     CityDataGrid.DataSource = cityRec = HandlerToDB.GetDataTable(ConfigSelectQueries.ALL_CITY);
     DataGrid.Focus();
 }
 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 callOnLoad()
        {
            DateTime now = DateTime.Now;

            txtCusExpDate.MinDate = new DateTime(now.Year + ConfigApp.CUSTOMER_EXPIRY_MIN_Y, now.Month + ConfigApp.CUSTOMER_EXPIRY_MIN_M, now.Day + ConfigApp.CUSTOMER_EXPIRY_MIN_D);
            DatePicker.MinDate    = ConfigApp.MIN_DATETIME;
            ModeID  = false;
            cityRec = new DataTable();
            txtCusCusCode.AdvanceText = HandlerToDB.GetNewID(ConfigFormNames.CUSTOMER_NEW).ToString();
            DataGrid.DataSource       = cityRec = HandlerToDB.GetDataTable(ConfigSelectQueries.ALL_CITY);
        }
Exemplo n.º 6
0
 private void callOnLoad()
 {
     ModeID                     = false;
     txtPSalesTax.Text          = ConfigApp.SALES_TEX_PERCENTAGE.ToString();
     companyList                = new DataTable();
     DatePicker.CustomFormat    = ConfigApp.DATETIME_FORMATE;
     txtProductCode.AdvanceText = HandlerToDB.GetNewID(ConfigFormNames.PRODUCT_NEW).ToString();
     HandlerToDB.SetComboBox(combMedType, ConfigFormNames.PRODUCT_NEW);
     HandlerToDB.SetComboBox(combSTMode, ConfigSelectQueries.SALES_TAX_MODE);
     HandlerToDB.SetComboBox(combDisMode, ConfigSelectQueries.DISCOUNT_MODE);
     HandlerToDB.SetComboBox(combGroup, ConfigSelectQueries.GROUPS_LOAD);
     DataGrid.DataSource = companyList = HandlerToDB.GetDataTable(ConfigSelectQueries.ALL_COMPANY);
 }
 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);
     }
 }
Exemplo n.º 8
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 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);
     }
 }
 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 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);
     }
 }
Exemplo n.º 12
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);
     }
 }
Exemplo n.º 13
0
 private void setInvoice()
 {
     //Check if invoice already exist or not
     OBJ_Stock.INVOICE_NO = txtInvoice.AdvanceText;
     OBJ_Stock.COMPANY_CODE =Convert.ToInt32( txtComCode.AdvanceText);
     if (HandlerToDB.GetCount(ConfigSelectQueryModes.NO_OF_INVOICES) == 0)
     {
         txtInvoice.Enabled = false;
         txtBatchNo.Enabled = true;
         txtBatchNo.Focus();
         CurrentStage = Stage.locked;
     }
     else
     {
         txtInvoice.AdvanceText = "";
         HANDLER.ShowMessage(txtMessage, "Invoice Already Exist in "+ ComDataGrid.Rows[ComDataGrid.SelectedRows[0].Index].Cells["C_Name"].Value.ToString());
     }
 }
Exemplo n.º 14
0
 private void callOnLoad()
 {
     lblModePro.Text = ConfigApp.SEARCH_MODE_ID_MESSAGE;
     ModeIDPRO = true;
     lblMode.Text = ConfigApp.SEARCH_MODE_ID_MESSAGE;
     ModeID = true;
     companyList = new DataTable();
     productList = new DataTable();
     ProDataGrid.DataSource = productList = HandlerToDB.GetDataTable(ConfigSelectQueries.ALL_PRODUCTS);
     ComDataGrid.DataSource = companyList = HandlerToDB.GetDataTable(ConfigSelectQueries.ALL_COMPANY);
     DateExpiry.CustomFormat = ConfigApp.DATETIME_EXPIRY_FORMATE;
     DateTime now = DateTime.Now;
     DateExpiry.MinDate = new DateTime(now.Year + ConfigApp.STOCK_EXPIRY_MIN_Y, now.Month + ConfigApp.STOCK_EXPIRY_MIN_M, now.Day + ConfigApp.STOCK_EXPIRY_MIN_D);
     dateInvoice.CustomFormat = ConfigApp.DATETIME_FORMATE;
     dateInvoice.MinDate = DateTime.Now;
     HandlerToDB.SetComboBox(combSTMode, ConfigSelectQueries.SALES_TAX_MODE);
     HandlerToDB.SetComboBox(combDisMode, ConfigSelectQueries.DISCOUNT_MODE);
     txtStockCode.AdvanceText = HandlerToDB.GetNewID(ConfigFormNames.STOCK_NEW).ToString();
 }
Exemplo n.º 15
0
 private void setBatch()
 {
     //Check if invoice already exist or not
     OBJ_Stock.BATCH_NO = txtBatchNo.AdvanceText;
     OBJ_Stock.COMPANY_CODE = Convert.ToInt32(txtComCode.AdvanceText);
     if (HandlerToDB.GetCount(ConfigSelectQueryModes.NO_OF_BATCHS) == 0)
     {
         txtQuantity.Enabled = true;
         dateInvoice.Enabled = true;
         DateExpiry.Enabled = true;                
         gbActions.Enabled = true;
         gPricing.Enabled = true;
         txtBatchNo.Enabled = false;
     }
     else
     {
         txtBatchNo.AdvanceText = "";
         HANDLER.ShowMessage(txtMessage, "Batch Already Exist in "+ComDataGrid.Rows[ComDataGrid.SelectedRows[0].Index].Cells["C_Name"].Value.ToString());
     }
 }
Exemplo n.º 16
0
 private void callOnLoad()
 {
     DataGrid.DataSource = HandlerToDB.GetDataTable(ConfigSelectQueries.ALL_CITY);
     HandlerToDB.SetComboBox(combZoneName, ConfigFormNames.CITY_NEW);
     FormReset();
 }
Exemplo n.º 17
0
 private void ZoneNew_Load(object sender, EventArgs e)
 {
     txtZCode.AdvanceText = HandlerToDB.GetNewID(ConfigFormNames.ZONE_NEW).ToString();
 }
Exemplo n.º 18
0
 private void callOnLoad()
 {
     HandlerToDB.SetComboBox(combZone, ConfigFormNames.CITY_NEW);
     DataGrid.DataSource = HandlerToDB.GetDataTable(ConfigSelectQueries.ALL_SALES_MAN);
     DataGrid.Focus();
 }
 private void callOnLoad()
 {
     DataGrid.DataSource = HandlerToDB.GetDataTable(ConfigSelectQueries.ALL_COMPANY);
     DataGrid.Focus();
 }
Exemplo n.º 20
0
 private void Company_Load(object sender, EventArgs e)
 {
     txtCCode.AdvanceText = HandlerToDB.GetNewID(ConfigFormNames.COMPANY).ToString();
     // txtCName.AdvanceText = DateTime.Now.ToString();
 }
 private void callOnLoad()
 {
     HandlerToDB.SetComboBox(combZone, ConfigFormNames.CITY_NEW);
     txtSalesManCode.AdvanceText = HandlerToDB.GetNewID(ConfigFormNames.SALES_MAN_NEW).ToString();
 }
Exemplo n.º 22
0
 private void btnAddNewZone_Click(object sender, EventArgs e)
 {
     GUI.loadFormInDialoge(ConfigFormNames.ZONE_NEW);
     HandlerToDB.SetComboBox(combZoneName, ConfigFormNames.CITY_NEW);
 }
 private void DialogeZoneList_Load(object sender, EventArgs e)
 {
     DataGrid.DataSource = HandlerToDB.GetDataTable(ConfigSelectQueries.ALL_ZONE);
 }
Exemplo n.º 24
0
 private void CityNew_Load(object sender, EventArgs e)
 {
     HandlerToDB.SetComboBox(combZoneName, ConfigFormNames.CITY_NEW);
     txtCCode2.AdvanceText = HandlerToDB.GetNewID(ConfigFormNames.CITY_NEW).ToString();
 }