示例#1
0
        private void fillBarCode()
        {
            try
            {
                masterTypeList = commonManager.GetMasterTypeList();
                var barCodeModesList = (from m in masterTypeList
                                        where m.CodeType == "MSTEanType"
                                        select new DropDownModel {
                    Code = m.ShortDesc, Description = m.ShortDesc
                }).ToList();

                barCodeModesList.Insert(0, new DropDownModel {
                    Code = null, Description = "All"
                });
                //cboBarCodeType.DataSource = barCodeModesList;
                //cboBarCodeType.DisplayMember = "Description";
                //cboBarCodeType.ValueMember = "Code";

                CommonFunc.PopulateComboBoxDataForWindowsForm(ref cboBarCodeType, barCodeModesList);
            }
            catch (Exception)
            {
                throw;
            }
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frmArticleStockIn_Load(object sender, EventArgs e)
        {
            txtArticleFilePath.Enabled = false; //vipin
            try
            {
                if (CommonFunc.Themeselect == "Theme 1")
                {
                    ThemeChange();
                }
                this.supplier = (from result in this.commonManager.GetSupplierBySite(CommonModel.SiteCode)
                                 select new DropDownModel
                {
                    Code = result.SupplierCode,
                    Description = result.SupplierName
                }).ToList();
                supplier.Insert(0, new DropDownModel {
                    Code = null, Description = "Select"
                });

                //cmbSupplierName.DataSource = supplier;
                //cmbSupplierName.DisplayMember = "Description";
                //cmbSupplierName.ValueMember = "Code";
                CommonFunc.PopulateComboBoxDataForWindowsForm(ref cmbSupplierName, this.supplier);
                ResetArticleStockInData();
                // CommonFunc.WriteResourceFile(this);
                //  CommonFunc.SetCultureFromResource(this);
            }
            catch (Exception ex)
            {
                CommonFunc.ShowMessage(ex.Message, MessageType.Information);
                Logger.Log(ex.Message, Logger.LogingLevel.Error);
            }
        }
示例#3
0
        private void cboTenderType_SelectedValueChanged(object sender, EventArgs e)
        {
            if (cboTenderType.SelectedValue != null)
            {
                if (cboTenderType.SelectedValue.ToString() == "CreditVouc(I)" || cboTenderType.SelectedValue.ToString() == "GiftVoucher(I)")
                {
                    cboProgramCode.Enabled = true;
                    this.programCodes      = (from result in this.commonManager.GetVouchers(cboTenderType.SelectedValue.ToString())
                                              select new DropDownModel
                    {
                        Code = result.VoucherCode,
                        Description = result.VoucherDesc
                    }).ToList();
                    //"ExtendRightColumn=true" tendertypes.Insert(0, new DropDownModel { Code = null, Description = "Select" });
                    //cboProgramCode.DataSource = programCodes;
                    //cboProgramCode.DisplayMember = "Description";
                    //cboProgramCode.ValueMember = "Code";

                    CommonFunc.PopulateComboBoxDataForWindowsForm(ref cboProgramCode, this.programCodes);
                    cboProgramCode.SelectedText = "";
                }
                //else if (cboTenderType.SelectedValue.ToString() == "CLPPoint")
                //{
                //    cboProgramCode.Enabled = true;
                //    this.programCodes = (from result in this.commonManager.getclpprogram(CommonModel.SiteCode)
                //                         select new DropDownModel
                //                         {
                //                             Code = result.CLPProgramId,
                //                             Description = result.CLPProgramName
                //                         }).ToList();


                //    CommonFunc.PopulateComboBoxData(ref cboProgramCode, this.programCodes);
                //}
                else
                {
                    cboProgramCode.SelectedIndex = -1;
                    cboProgramCode.Enabled       = false;
                }
            }
        }
示例#4
0
        private void frmTender_Load(object sender, System.EventArgs e)
        {
            try
            {
                if (CommonFunc.Themeselect == "Theme 1")
                {
                    ThemeChange();
                }
                this.tenderActionButton.btnSave.Click   += new System.EventHandler(btnSave_Click);
                this.tenderActionButton.btnCancel.Click += new System.EventHandler(btnCancel_Click);
                this.tenderActionButton.btnClear.Click  += new EventHandler(btnClear_Click);


                cboSite.Enabled        = false;
                cboProgramCode.Enabled = false;
                this.tenderTypes       = (from result in this.commonManager.GetTenderTypeList()
                                          select new DropDownModel
                {
                    Code = result.TenderType,
                    Description = result.Description
                }).ToList();
                CommonFunc.PopulateComboBoxDataForWindowsForm(ref cboTenderType, this.tenderTypes);
                //cboTenderType.DataSource = tenderTypes;
                //cboTenderType.DisplayMember = "Description";
                //cboTenderType.ValueMember = "Code";
                setInitialFormsValidations();
                Fillgrid();
                setTabIndex();
                // CommonFunc.WriteResourceFile(this);
                CommonFunc.SetCultureFromResource(this);
            }
            catch (System.Exception ex)
            {
                CommonFunc.ShowMessage(ex.Message, MessageType.Information);
                Logger.Log(ex.Message, Logger.LogingLevel.Error);
            }
            finally
            {
            }
        }
示例#5
0
        private void PopulateComboBoxStockOut()
        {
            try
            {
                this.stockOutReasonList = this.commonManager.GetStockOutReasons();
                CommonFunc.PopulateComboBoxDataForWindowsForm(ref cmbStockOutReason, this.stockOutReasonList);
                //cmbStockOutReason.DataSource = stockOutReasonList;
                //cmbStockOutReason.DisplayMember = "Description";
                //cmbStockOutReason.ValueMember = "Code";

                this.supplierList = (from result in this.commonManager.GetSupplierBySite(CommonModel.SiteCode)
                                     select new DropDownModel
                {
                    Code = result.SupplierCode,
                    Description = result.SupplierName
                }).ToList();


                supplierList.Insert(0, new DropDownModel {
                    Code = "Select", Description = "-- Select --"
                });
                CommonFunc.PopulateComboBoxDataForWindowsForm(ref cmbSupplierName, this.supplierList);
                //cmbSupplierName.DataSource = supplierList;
                //cmbSupplierName.DisplayMember = "Description";
                //cmbSupplierName.ValueMember = "Code";

                this.fromLocationList = this.commonManager.GetFromLocation();
                CommonFunc.PopulateComboBoxDataForWindowsForm(ref cmbFromLocation, this.fromLocationList);
                //cmbFromLocation.DataSource = fromLocationList;
                //cmbFromLocation.DisplayMember = "Description";
                //cmbFromLocation.ValueMember = "Code";
            }
            catch (Exception ex)
            {
                Logger.Log(ex.Message, Logger.LogingLevel.Error);
                throw ex;
            }
        }
示例#6
0
        /// <summary>
        ///  on state change bind city list of that state ..
        /// </summary>
        private void cboState_SelectedValueChanged(object sender, EventArgs e)
        {
            try
            {
                cboCity.SelectedIndex = -1;
                if (cboState.SelectedValue != null)
                {
                    var cityList = (from p in areaCodeList
                                    where p.AreaType == (int)MaterType.City && p.ParentCode == cboState.SelectedValue.ToString()
                                    select new DropDownModel
                    {
                        Code = p.AreaCode,
                        Description = p.Description
                    }).ToList();

                    CommonFunc.PopulateComboBoxDataForWindowsForm(ref cboCity, cityList);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#7
0
        private void frmSupplier_Load(object sender, EventArgs e)
        {
            try
            {
                if (CommonFunc.Themeselect == "Theme 1")
                {
                    ThemeChange();
                }
                this.supplierActionButtons.btnSave.Click   += new System.EventHandler(btnSave_Click);
                this.supplierActionButtons.btnCancel.Click += new System.EventHandler(btnCancel_Click);
                this.supplierActionButtons.btnClear.Click  += new EventHandler(btnClear_Click);
                this.btnSearch.Click     += new EventHandler(btnSearch_Click);
                txtSupplierCode.KeyPress += new KeyPressEventHandler(txtValidateSpecialCharSpace);


                this.setInitialFormsValidations();

                this.areaCodeList = commonManager.GetAreaCodeList();

                var countryList = (from p in areaCodeList
                                   where p.AreaType == (int)MaterType.Country
                                   select new DropDownModel
                {
                    Code = p.AreaCode,
                    Description = p.Description
                }).ToList();

                masterTypeList = commonManager.GetMasterTypeList();
                var paymentModesList = (from m in masterTypeList
                                        where m.CodeType == MaterType.VendorPaymentTerms.ToString()
                                        select new DropDownModel {
                    Code = m.Code, Description = m.ShortDesc
                }).ToList();

                var shipmentModesList = (from m in masterTypeList
                                         where m.CodeType == MaterType.VendorShipmentType.ToString()
                                         select new DropDownModel {
                    Code = m.Code, Description = m.ShortDesc
                }).ToList();

                CommonFunc.PopulateComboBoxDataForWindowsForm(ref cboCountry, countryList);
                CommonFunc.PopulateComboBoxDataForWindowsForm(ref cboPaymentMethods, paymentModesList);
                CommonFunc.PopulateComboBoxDataForWindowsForm(ref cboShipmentMethod, shipmentModesList);
                clearForm();
                CommonFunc.SetCultureFromResource(this);
                //code added by roshan for issue id 2835
                label3.Text             = "Name";
                lblVatTinNo.Text        = "GSTNo.";
                lblVatTinDate.Visible   = false;
                lblCstTinNo.Visible     = false;
                lblCstTinDate.Visible   = false;
                lblTinNo.Visible        = false;
                lblServiceTaxNo.Visible = false;
                dtpVatTinDate.Visible   = false;
                dtpCstTinDate.Visible   = false;
                txtCstTinNo.Visible     = false;
                txtTinNo.Visible        = false;
                txtServiceTaxNo.Visible = false;
            }
            catch (System.Exception ex)
            {
                Logger.Log(ex, Logger.LogingLevel.Error);
                //MessageBox.Show(ex.Message);
            }
            finally
            {
            }
        }
示例#8
0
        private void frmTax_Load(object sender, EventArgs e)
        {
            try
            {
                if (CommonFunc.Themeselect == "Theme 1")
                {
                    ThemeChange();
                }

                this.document = (from result in this.commonManager.GetDocumentType(CommonModel.SiteCode)
                                 select new DropDownModel
                {
                    Code = result.DocumentType,
                    Description = result.DocumentTypeDescription
                }).ToList();
                document.Insert(0, new DropDownModel {
                    Code = null, Description = "Select"
                });

                CommonFunc.PopulateComboBoxDataForWindowsForm(ref cmbDocumentType, this.document);

                this.AppliedOn = (from result in this.commonManager.GetAppliedOn(CommonModel.SiteCode)
                                  select new DropDownModel
                {
                    Code = result.LongDesc,
                    Description = result.LongDesc
                }).ToList();
                AppliedOn.Insert(0, new DropDownModel {
                    Code = null, Description = "Select"
                });

                CommonFunc.PopulateComboBoxDataForWindowsForm(ref cmbAppliedon, this.AppliedOn);


                //DataTable dt = new DataTable();
                //dt.Columns.Add("Code");
                //dt.Columns.Add("Description");
                //dt.Rows.Add("0", "Select");
                //dt.Rows.Add("MRP", "MRP");
                //dt.Rows.Add("NetAmount", "Net Amount");
                //dt.Rows.Add("GrossAmount", "Gross Amount");
                //CommonFunc.PopulateComboBoxDataForWindowsForm(ref cmbAppliedon, dt);

                this.TaxActionButton.btnSave.Click   += new System.EventHandler(btnSave_Click);
                this.TaxActionButton.btnCancel.Click += new System.EventHandler(btnCancel_Click);
                this.TaxActionButton.btnClear.Click  += new EventHandler(btnClear_Click);

                setInitialFormsValidations();

                Fillgrid();
                //CommonFunc.WriteResourceFile(this);
                CommonFunc.SetCultureFromResource(this);
                lblAppliedOn.MandatoryLabelText    = "*";
                lblAppliedOn.NormalLabelText       = "Applied On";
                lblTaxName.MandatoryLabelText      = "*";
                lblTaxValue.MandatoryLabelText     = "*";
                lblTaxValueType.MandatoryLabelText = "*";
                lbldocumenttype.MandatoryLabelText = "*";
                DefaultGridSetting();
            }
            catch (System.Exception ex)
            {
                CommonFunc.ShowMessage(ex.Message, MessageType.Information);
                Logger.Log(ex.Message, Logger.LogingLevel.Error);
            }
        }