Beispiel #1
0
        private void barButtonItem3_ItemClick(object sender, ItemClickEventArgs e)
        {
            Application.DoEvents();
            progressPanel1.Visible = true;
            var b = new YearEndClass();
            var ds = b.GetClosingYear();
            int cyear = 0;
            if (ds.Rows.Count == 0)
            {
                var f1 = new YearCloseProcess();
                f1.ShowDialog();
                cyear = f1._ClosingYear;
            }
            else
            {
                cyear = int.Parse(ds.Rows[0]["CYEAR"].ToString());
            }
            if(cyear==0) return;

            var f = new TxtFileRead();
            f.ValidateYearEnd(cyear);
            f.ShowDialog();
            if (f.iSvalid)
            {
              DownLoadFiles(f.Fname, f.Machineno, f.Inventoryby, f.Closingperiod);
             _fname=f.Fname;
            _fMachineno =f.Machineno;
            _fInventoryby= f.Inventoryby;
            _fClosingperiod = f.Closingperiod;
             SaveDataToInventoryYear(f.Closingperiod);
             barButtonItem4.Enabled = true;
            }
            progressPanel1.Visible =false;
        }
Beispiel #2
0
 private void YearEndProcess_Load(object sender, EventArgs e)
 {
     var ds = ClsGetData.GetItemGroup();
     repositoryItemLookUpEdit1.DataSource = ds;
     var dsW = ClsGetData.GetStoreList();
     var bsW = new BindingSource(dsW, "") { Filter = "COMPANY = '" + Utils.Company + "'" };
     lookupfrom.Properties.DataSource = bsW;
     var b = new YearEndClass();
     var ds1 = b.GetClosingYear();
     if (ds1.Rows.Count > 0)
     {
         if (_fClosingperiod == 0)
             _fClosingperiod = int.Parse(ds1.Rows[0]["CYEAR"].ToString());
         _dsyearend = b.LoadYearEndInventory(int.Parse(ds1.Rows[0]["CYEAR"].ToString())); 
     }
     _GridHeading = "Physical Inventory Report";
     yearEndInventoryBindingSource.DataSource = _dsyearend;// gridControl1.DataSource = _dsyearend;
     txtstock.Properties.Mask.EditMask = "\\d+";
     txtstock.Properties.Mask.MaskType = MaskType.RegEx;
 }