public VendorOrderSheetForm()
        {
            InitializeComponent();

            MasterFilePath            = CommonFunctions.MasterFilePath;
            txtBoxSaveFolderPath.Text = System.IO.Path.GetDirectoryName(MasterFilePath);

            ListColors = new List <Color>();
            ListColors.Add(Color.FromArgb(184, 204, 228));
            ListColors.Add(Color.FromArgb(218, 238, 243));
            ListColors.Add(Color.FromArgb(216, 228, 188));
            ListColors.Add(Color.FromArgb(228, 223, 236));
            ListColors.Add(Color.FromArgb(255, 255, 153));
            ListColors.Add(Color.FromArgb(224, 224, 224));
            ListColors.Add(Color.FromArgb(178, 255, 102));
            ListColors.Add(Color.FromArgb(255, 178, 102));
            ListColors.Add(Color.FromArgb(255, 153, 153));
            ListColors.Add(Color.FromArgb(51, 255, 153));

            CommonFunctions.ResetProgressBar();
            lblStatus.Text = "";
            cmbBoxTimePeriodUnits.Items.Clear();
            cmbBoxTimePeriodUnits.Items.Add("Days");
            cmbBoxTimePeriodUnits.Items.Add("Weeks");
            cmbBoxTimePeriodUnits.Items.Add("Months");
            cmbBoxTimePeriodUnits.Items.Add("Years");
            cmbBoxTimePeriodUnits.SelectedIndex = (Int32)CommonFunctions.ObjPurchaseOrderSettings.PastSalePeriodUnits;
            numUpDownTimePeriod.Value           = CommonFunctions.ObjPurchaseOrderSettings.PastSalePeriodValue;

            openFileDialog1.Multiselect        = false;
            openFileDialog1.CheckFileExists    = true;
            openFileDialog1.CheckPathExists    = true;
            txtBoxProductInventoryFile.Text    = Path.GetDirectoryName(MasterFilePath) + @"\ProductInventory.xlsx";
            txtBoxProductStockHistoryFile.Text = Path.GetDirectoryName(MasterFilePath) + @"\ProductStockHistory.xlsx";
        }
        public SellerOrderSheetForm()
        {
            try
            {
                InitializeComponent();
                MasterFilePath          = CommonFunctions.MasterFilePath;
                txtBoxOutputFolder.Text = System.IO.Path.GetDirectoryName(MasterFilePath);

                ListColors = new List <Color>();
                ListColors.Add(Color.FromArgb(184, 204, 228));
                ListColors.Add(Color.FromArgb(218, 238, 243));
                ListColors.Add(Color.FromArgb(216, 228, 188));
                ListColors.Add(Color.FromArgb(228, 223, 236));
                ListColors.Add(Color.FromArgb(255, 255, 153));
                ListColors.Add(Color.FromArgb(224, 224, 224));
                ListColors.Add(Color.FromArgb(178, 255, 102));
                ListColors.Add(Color.FromArgb(255, 178, 102));
                ListColors.Add(Color.FromArgb(255, 153, 153));
                ListColors.Add(Color.FromArgb(51, 255, 153));

                CommonFunctions.ResetProgressBar();
            }
            catch (Exception ex)
            {
                CommonFunctions.ShowErrorDialog("SellerOrderSheetForm.ctor()", ex);
            }
        }
Example #3
0
        void ShowChildForm(Form ObjForm)
        {
            try
            {
                if (MdiChildren.Length > 0)
                {
                    return;
                }

                CommonFunctions.ResetProgressBar();

                CommonFunctions.CurrentForm = ObjForm;
                ObjForm.MdiParent           = this;
                ObjForm.ShowIcon            = false;
                ObjForm.ShowInTaskbar       = false;
                ObjForm.MinimizeBox         = false;
                ObjForm.MaximizeBox         = false;
                ObjForm.FormBorderStyle     = System.Windows.Forms.FormBorderStyle.FixedDialog;
                ObjForm.StartPosition       = FormStartPosition.CenterScreen;
                ObjForm.FormClosed         += new FormClosedEventHandler(ChildFormClosed);
                ObjForm.Show();
            }
            catch (Exception ex)
            {
                CommonFunctions.ShowErrorDialog("MainForm.ShowChildForm()", ex);
            }
        }
Example #4
0
        private void bgWorkerCreatePO_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            CommonFunctions.ResetProgressBar();

            CommonFunctions.ToggleEnabledPropertyOfAllControls(this);
            lblStatus.Enabled = true;
            btnClose.Focus();
        }
Example #5
0
 private void bgWorkerOrderMaster_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     try
     {
         CommonFunctions.ResetProgressBar();
         btnClose.Focus();
     }
     catch (Exception ex)
     {
         CommonFunctions.ShowErrorDialog("OrderMasterForm.bgWorkerOrderMaster_RunWorkerCompleted()", ex);
     }
 }
        private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            try
            {
                CommonFunctions.ResetProgressBar();

                btnCreateOrderSheet.Enabled = true;
                btnCancel.Enabled           = true;

                btnCancel.Focus();
            }
            catch (Exception ex)
            {
                CommonFunctions.ShowErrorDialog("SellerOrderSheetForm.backgroundWorker1_RunWorkerCompleted()", ex);
            }
        }
        private void bgWorkerSellerHistory_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            try
            {
                CommonFunctions.ResetProgressBar();

                btnCreateReport.Enabled = true;
                btnClose.Enabled        = true;

                btnClose.Focus();
            }
            catch (Exception ex)
            {
                CommonFunctions.ShowErrorDialog("SellerHistoryReportForm.bgWorkerSellerHistory_RunWorkerCompleted()", ex);
            }
        }
Example #8
0
        public VendorPurchaseOrderForm()
        {
            InitializeComponent();

            MasterFilePath          = CommonFunctions.MasterFilePath;
            txtBoxOutputFolder.Text = System.IO.Path.GetDirectoryName(MasterFilePath);

            CommonFunctions.ResetProgressBar();

            lblStatus.Text = "";
            CommonFunctions.ListSelectedVendors.Clear();

            dateTimePO.Value            = DateTime.Now;
            txtBoxVendorOrderSheet.Text = txtBoxOutputFolder.Text + @"\VendorOrder_" + dateTimePO.Value.ToString("dd-MM-yyyy") + ".xlsx";

            FillLineFromOrderMaster();
        }
Example #9
0
 private void bgWorkerUpdPurchasesForm_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     try
     {
         CommonFunctions.ResetProgressBar();
         btnUpdate.Enabled                     = true;
         btnClose.Enabled                      = true;
         btnBrowseVendorPOFile.Enabled         = true;
         btnBrowseVendorHistory.Enabled        = true;
         btnBrowseProductInvFile.Enabled       = true;
         btnBrowseProductStockHistFile.Enabled = true;
         btnClose.Focus();
     }
     catch (Exception ex)
     {
         CommonFunctions.ShowErrorDialog("UpdateProductPurchasesForm.bgWorkerUpdPurchasesForm_RunWorkerCompleted()", ex);
     }
 }
Example #10
0
        public UpdateOrderMasterForm()
        {
            InitializeComponent();

            OrderMasterFilePath = CommonFunctions.MasterFilePath;
            lblStatus.Text      = "";

            CommonFunctions.ResetProgressBar();

            chkBoxUpdSellerMaster.Checked  = true;
            chkBoxUpdSellerHistory.Checked = true;
            chkBoxUpdProductSales.Checked  = false;
            chkBoxUpdProductSales_CheckedChanged(null, null);
            groupBoxHistoryUpdate.Enabled      = false;
            btnUpdate.Enabled                  = false;
            FileDialgSellerSummary.Multiselect = false;

            CommonFunctions.ObjProductMaster.ResetStockProducts();
        }
Example #11
0
        public UpdateProductPurchasesForm()
        {
            InitializeComponent();

            CommonFunctions.ResetProgressBar();

            lblStatus.Text = "";

            openFileDialog1.Multiselect        = false;
            openFileDialog1.CheckFileExists    = true;
            openFileDialog1.CheckPathExists    = true;
            groupBoxProductVendorFiles.Enabled = false;
            btnUpdate.Enabled = false;
            btnClose.Enabled  = true;
            chkBoxUpdProductInventory.Checked = true;
            chkBoxUpdStockHistory.Checked     = true;
            chkBoxUpdVendorHistory.Checked    = true;

            CommonFunctions.ObjProductMaster.ResetStockProducts();
        }
Example #12
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            try
            {
                CommonFunctions.MasterFilePath = txtBoxMasterFilePath.Text;
                CommonFunctions.ResetProgressBar();

                btnOK.Enabled = false;
#if DEBUG
                LoadDetailsFromOrderMaster();
#else
                ReportProgress = bgWorkerOrderMaster.ReportProgress;
                bgWorkerOrderMaster.RunWorkerAsync();
                bgWorkerOrderMaster.WorkerReportsProgress = true;
#endif
            }
            catch (Exception ex)
            {
                CommonFunctions.ShowErrorDialog("OrderMasterForm.btnOK_Click()", ex);
            }
        }
        public SellerHistoryReportForm()
        {
            try
            {
                InitializeComponent();

                chkBoxDateFilter.Checked = false;

                dateTimePickerStart.Format       = DateTimePickerFormat.Custom;
                dateTimePickerStart.CustomFormat = "dd-MMM-yyyy";
                dateTimePickerStart.Value        = DateTime.Now.Date;
                dateTimePickerStart.Enabled      = false;

                dateTimePickerEnd.Format       = DateTimePickerFormat.Custom;
                dateTimePickerEnd.CustomFormat = "dd-MMM-yyyy";
                dateTimePickerEnd.Value        = DateTime.Now.Date;
                dateTimePickerEnd.Enabled      = false;

                CommonFunctions.ResetProgressBar();

                lblStatus.Text = "";

                FillSellerList();

                txtBoxSellerHistoryFilePath.Text = Path.GetDirectoryName(CommonFunctions.MasterFilePath) + @"\SellerHistory.xlsx";
                SellerHistoryFilePath            = txtBoxSellerHistoryFilePath.Text;

                txtBoxSaveFolderPath.Text = Path.GetDirectoryName(CommonFunctions.MasterFilePath);
                SaveFolderPath            = txtBoxSaveFolderPath.Text;

                btnCreateReport.Focus();
            }
            catch (Exception ex)
            {
                CommonFunctions.ShowErrorDialog("SellerHistoryReportForm.ctor()", ex);
            }
        }
Example #14
0
 private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     CommonFunctions.ResetProgressBar();
     btnClose.Focus();
 }