Exemplo n.º 1
0
        private void FgAdjustInInterfaceData(string posttype, string productNo, string postRef, DateTime?fromDate, DateTime?toDate)
        {
            try
            {
                base.ExecutionStart();
                base.BeginProcessing("Begin Loading Data...", "Please Waiting for Loading Data");

                using (InterfaceDataBLL inDataBll = new InterfaceDataBLL())
                {
                    this.dtbAdjustInInfData = inDataBll.IfInAdjustInList(posttype, productNo, postRef, fromDate, toDate, ((frmMainMenu)this.ParentForm).UserID);
                }

                if (this.dtbAdjustInInfData != null)
                {
                    this.ConditionsColumnView(this.grdAdjustIn);
                }

                this.grdAdjustIn.DataSource   = this.dtbAdjustInInfData;
                this.dntQryStkAsOn.DataSource = this.dtbAdjustInInfData;

                //check enable button
                this.CheckEnablePostData("[DATA_TYPE] = 'NEW'");
                base.ExecutionStop();
            }
            catch (Exception ex)
            {
                base.FinishedProcessing();

                UiUtility.EndProcessing();

                this.grdAdjustIn.DataSource   = null;
                this.dntQryStkAsOn.DataSource = null;

                XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
            finally
            {
                ((frmMainMenu)this.ParentForm).ExecuteTime.Caption = base.ExecuteTime;
                base.FinishedProcessing();
            }
        }
Exemplo n.º 2
0
        private void PrintQCReturnOrderDetail(List <QCReturnHdr> lstQcReturn)
        {
            try
            {
                Cursor.Current = Cursors.WaitCursor;
                //UiUtility.BeginProcessing("Loading Report", this);

                DataSet ds;

                using (QCReturnBLL qcReturnBll = new QCReturnBLL())
                {
                    ds = qcReturnBll.PrintQCReturnOrderDtlReport(lstQcReturn);
                }

                ReportViewer viewer = new ReportViewer {
                    AutoCloseAfterPrint = true
                };

                RPT_FG_RETURN_WH rpt = new RPT_FG_RETURN_WH {
                    DataSource = ds
                };
                rpt.Parameters["paramUserPrint"].Value = ((frmMainMenu)this.ParentForm).UserID;
                rpt.CreateDocument();
                viewer.SetReport(rpt);
                viewer.ShowDialog();
            }
            catch (Exception ex)
            {
                Cursor.Current = Cursors.Default;
                UiUtility.EndProcessing();

                XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }