示例#1
0
        public void AdvanceSearchLoadingOrder(string loadingNo, string whid, DateTime?fromDate, DateTime?toDate)
        {
            List <LoadingOrder> lstLoadingOrd = null;

            try
            {
                base.ExecutionStart();
                base.BeginProcessing("Begin Load data...", "Please Waiting for Loading Data");

                using (LoadingOrderBLL loadingOrdBll = new LoadingOrderBLL())
                {
                    lstLoadingOrd = loadingOrdBll.AdvLoadingOrder(loadingNo, whid, fromDate, toDate);
                }

                this.chkSelect.ClearSelection();

                this.grdLoadingOrder.DataSource = lstLoadingOrd;
                this.dntLoadingOrder.DataSource = lstLoadingOrd;

                base.ExecutionStop();
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
        }
示例#2
0
        public void GetLoadingOrderList(string whid, string findValue, DateTime?fromDate, DateTime?toDate)
        {
            List <LoadingOrder> lstLoadingOrd = null;

            try
            {
                base.ExecutionStart();
                base.BeginProcessing("Begin Load data...", "Please Waiting for Loading Data");

                using (LoadingOrderBLL loadingOrdBll = new LoadingOrderBLL())
                {
                    lstLoadingOrd = loadingOrdBll.GetLoadingOrderList(findValue, whid, fromDate, toDate);
                }

                this.chkSelect.ClearSelection();

                this.grdLoadingOrder.DataSource = lstLoadingOrd;
                this.dntLoadingOrder.DataSource = lstLoadingOrd;

                base.ExecutionStop();
            }
            catch (Exception ex)
            {
                base.FinishedProcessing();
                XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
            finally
            {
                base.FinishedProcessing();
                ((frmMainMenu)this.ParentForm).ExecuteTime.Caption = base.ExecuteTime;
            }
        }
示例#3
0
        private void InitializaLOVData()
        {
            try
            {
                using (LoadingOrderBLL loadingOrdBll = new LoadingOrderBLL())
                {
                    List <Warehouse> lstWH = loadingOrdBll.GetWarehouse();
                    if (lstWH != null)
                    {
                        this.lueWarehouse.Properties.DataSource      = lstWH;
                        this.lueSearchWH.Properties.DataSource       = lstWH;
                        this.grvLoadingOrder_rps_lueWH_ID.DataSource = lstWH;
                    }
                }

                string defaultWH = HTN.BITS.UIL.PLASESS.Properties.Settings.Default.Default_WH;

                if (!string.IsNullOrEmpty(defaultWH))
                {
                    this.lueSearchWH.EditValue = defaultWH;
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
        }
 private void InitializaLOVData()
 {
     try
     {
         using (LoadingOrderBLL loadingOrdBll = new LoadingOrderBLL())
         {
             List <Warehouse> lstWH = loadingOrdBll.GetWarehouse();
             if (lstWH != null)
             {
                 this.lueWarehouse.Properties.DataSource = lstWH;
             }
         }
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
     }
 }
示例#5
0
        public void GetLoadingOrderDetail(string loadingNo)
        {
            try
            {
                using (LoadingOrderBLL loadingOrdBll = new LoadingOrderBLL())
                {
                    this.dtbLoadingOrderDtl = loadingOrdBll.GetLoadingOrderDetail(loadingNo);
                }

                if (this.dtbLoadingOrderDtl != null)
                {
                    this.grdLoadingDtl.DataSource = this.dtbLoadingOrderDtl;
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
        }
示例#6
0
        public void GetBindingLoadingOrder(string loadingNo)
        {
            LoadingOrder loadingOrd = null;

            try
            {
                using (LoadingOrderBLL loadingOrdBll = new LoadingOrderBLL())
                {
                    loadingOrd = loadingOrdBll.GetLoadingOrder(loadingNo);
                }

                if (loadingOrd != null)
                {
                    this.ClearErrorControl();

                    this.txtLOADING_NO.Text        = loadingOrd.LOADING_NO;
                    this.txtLOADING_DATE.EditValue = loadingOrd.LOADING_DATE;
                    this.lueWarehouse.EditValue    = loadingOrd.WH_ID;

                    this.txtTRUCK_NO.Text           = loadingOrd.TRUCK_NO;
                    this.txtCONTAINER_NO.Text       = loadingOrd.CONTAINER_NO;
                    this.dtpDELIVERY_DATE.EditValue = loadingOrd.DELIVERY_DATE;
                    this.txtREMARK.Text             = loadingOrd.REMARK;
                    this.icbREC_STAT.EditValue      = loadingOrd.REC_STAT;

                    this.GetLoadingOrderDetail(loadingOrd.LOADING_NO);
                }
                else
                {
                    this.ClearDataOnScreen();
                    XtraMessageBox.Show(this, "No Data found.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
        }
示例#7
0
        private void PrintPartListInPallet(string loadingNo)
        {
            try
            {
                base.BeginProcessing("Begin Load Report...", "Please Waiting for Loading Report");

                DataSet ds;

                using (LoadingOrderBLL loadingOrdBll = new LoadingOrderBLL())
                {
                    ds = loadingOrdBll.PrintPartListInPalletReport(loadingNo);
                }

                ReportViewer viewer = new ReportViewer();
                viewer.AutoCloseAfterPrint = true;

                RPT_PARTLIST_IN_PALLET rpt = new RPT_PARTLIST_IN_PALLET();

                rpt.DataSource = ds;
                rpt.Parameters["paramUserPrint"].Value = ((frmMainMenu)this.ParentForm).UserID;
                rpt.CreateDocument();
                viewer.SetReport(rpt);
                base.FinishedProcessing();
                viewer.ShowDialog();
            }
            catch (Exception ex)
            {
                base.FinishedProcessing();

                XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
            finally
            {
                base.FinishedProcessing();
            }
        }
示例#8
0
        public void UpdateLoadingOrder()
        {
            string       result     = string.Empty;
            LoadingOrder loadingOrd = new LoadingOrder();

            try
            {
                #region "Loading Order Header"

                loadingOrd.LOADING_NO    = this.txtLOADING_NO.Text;
                loadingOrd.LOADING_DATE  = Convert.ToDateTime(this.txtLOADING_DATE.EditValue, DateTimeFormatInfo.CurrentInfo);
                loadingOrd.WH_ID         = this.lueWarehouse.EditValue.ToString();
                loadingOrd.TRUCK_NO      = this.txtTRUCK_NO.Text;
                loadingOrd.CONTAINER_NO  = this.txtCONTAINER_NO.Text;
                loadingOrd.DELIVERY_DATE = this.dtpDELIVERY_DATE.DateTime;
                loadingOrd.REMARK        = this.txtREMARK.Text;
                loadingOrd.REC_STAT      = (bool)this.icbREC_STAT.EditValue;

                #endregion

                using (LoadingOrderBLL loadingOrdBll = new LoadingOrderBLL())
                {
                    result = loadingOrdBll.UpdateLoadingOrder(loadingOrd, ((frmMainMenu)this.ParentForm).UserID);
                }

                if (result.Equals("OK"))
                {
                    NotifierResult.Show("Update Complete", "Result", 50, 1000, 50, NotifyType.Safe);
                }
                else
                {
                    NotifierResult.Show(result, "Error", 100, 1000, 0, NotifyType.Warning);
                }
            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;
                NotifierResult.Show(ex.Message, "Error", 100, 1000, 0, NotifyType.Warning);
            }
            finally
            {
                this.FormState = eFormState.ReadOnly;
                //Get all Invoice on Invoice List
                //this.GetLoadingOrderList(this.txtSearch.Text, this.dteFromDate.DateTime, this.dteToDate.DateTime);

                //if (result.Equals("OK"))
                //{
                //    GridView viewList = (GridView)this.grdLoadingOrder.Views[0];


                //    int position = UiUtility.GetRowHandleByColumnValue(viewList, "LOADING_NO", loadingOrd.LOADING_NO);
                //    if (position != 0)
                //    {
                //        if (position != GridControl.InvalidRowHandle)
                //        {
                //            this.dntLoadingOrder.Position = position;
                //        }
                //    }
                //    else
                //    {
                //        viewList.FocusedRowHandle = 0;
                //    }

                //}

                this.Cursor = Cursors.Default;
            }
        }