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 Sales_FontChanged(object sender, EventArgs e)
 {
     HANDLER.ShowOnMidTop(Stage1, this.Width);
     HANDLER.ShowOnMidTop(Stage2, this.Width);
     HANDLER.ShowOnMidTop(Stage3, this.Width);
     HANDLER.ShowOnMidTop(Stage4, this.Width);
 }
        private void Stock_FontChanged(object sender, EventArgs e)
        {

            HANDLER.ShowOnMidTop(panel2, this.Width);
            HANDLER.ShowOnMidTop(panel1, this.Width);
            HANDLER.ShowOnMidTop(panel3, this.Width);
        }
 private void Dashboard_Load(object sender, EventArgs e)
 {
     SetSize();
     HANDLER.LoadCompanyInfo();
     panel1.Controls.Add(ConfigApp.DisplayArea);
     GUI.loadFormInPanel(ConfigApp.DisplayArea, ConfigFormNames.WELCOME_SCREEN);
     this.Text = "Sotck Management System | BSolutions | " + ConfigCompany.CompanyName;
 }
 private bool IsValidate()
 {
     if (txtCName.AdvanceText == "" || txtCAddress.AdvanceText == "" || txtCCity.AdvanceText == "" || txtCPHNo.AdvanceText == "" || txtCFaxNo.AdvanceText == "" || txtCEmail.AdvanceText == "")
     {
         HANDLER.ShowMessage(txtMessage, ConfigApp.NOT_VALID_FORM_MESSAGE);
         return(false);
     }
     return(true);
 }
 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 (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);
     }
 }
Esempio n. 9
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 (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);
     }
 }
Esempio 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);
     }
 }
Esempio 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());
     }
 }
Esempio n. 14
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());
     }
 }
Esempio n. 15
0
 private void nextStage()
 {
     switch (CurrentStage)
     {
         case Stage.Zero:
             CurrentStage = Stage.one;
             panel1.Visible = true;
             panel2.Visible = false;
             panel3.Visible = false;
             break;
         case Stage.one:
             CurrentStage = Stage.two;
             panel1.Visible = false;
             panel2.Visible = true;
             panel3.Visible = false;
             break;
         case Stage.two:
             CurrentStage = Stage.three;
             panel1.Visible = false;
             panel2.Visible = false;
             panel3.Visible = true;
             txtInvoice.Focus();
             gbActions.Enabled = false;
             break;
         case Stage.three:
             break;
         case Stage.locked:
             //to select another product
             panel2.Visible = false;
             panel3.Visible = true;
             break;
         case Stage.NoProduct:
             HANDLER.ShowMessage(txtMessage, "Select company having atleast 1 one product");
             break;
         default:
             break;
     }
 }
Esempio n. 16
0
 private bool checkLocks()
 {
     if (LicenseExpLock)
     {
         HANDLER.ShowMessage(txtMessage, "License is Expired of this customer" + Environment.NewLine + "Check \"Ignore this time\" to ignore");
         return(false);
     }
     if (CustomerLock)
     {
         HANDLER.ShowMessage(txtMessage, "No customer in this city you selected" + Environment.NewLine + "Please select another city having atleast 1 customer");
         return(false);
     }
     if (SalesManLock)
     {
         HANDLER.ShowMessage(txtMessage, "No sales man in this Zone you selected" + Environment.NewLine + "Please first asign zone to a sales man");
         return(false);
     }
     if (ProductLock)
     {
         HANDLER.ShowMessage(txtMessage, "No Product in company or search in your choice" + Environment.NewLine + "Please search other one or select another company");
         return(false);
     }
     return(true);
 }
 private void CompanyModify_FontChanged(object sender, EventArgs e)
 {
     HANDLER.ShowOnMidTop(panel1, this.Width);
 }
 private void CityDelete_FontChanged(object sender, EventArgs e)
 {
     HANDLER.ShowOnMidTop(panel1, this.Width);
 }
 private void SalesManNew_FontChanged(object sender, EventArgs e)
 {
     HANDLER.ShowOnMidTop(panel1, this.Width);
 }
Esempio n. 20
0
 public void Register <MSG, HANDLER>() where HANDLER : IMessageHandler, new()
 {
     mHandlers[typeof(MSG)] = new HANDLER();
 }