示例#1
0
        ///// <summary>
        ///// Method FillTVehicalRecordStatus to fill the vehicle status dropdown.
        ///// </summary>
        ///// <param name="NA"></param>
        ///// <returns>void</returns>
        ///// <createdBy></createdBy>
        ///// <createdOn>Apr-13,2016</createdOn>
        //public void DriverTypeDdl(object obj)
        //{
        //    CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgStart, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
        //    try
        //    {

        //        List<string> List = _serviceInstance.DriverList().ToList();
        //        List.Insert(0, "All");
        //        DriverList = null;
        //        DriverList = List;

        //    }
        //    catch (Exception ex)
        //    {
        //        bool displayErrorOnUI = false;
        //        CommonSettings.logger.LogError(this.GetType(), ex);
        //        if (displayErrorOnUI)
        //        { throw; }
        //    }
        //    finally
        //    {
        //        CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgEnd, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
        //    }
        //}

        ///// <summary>
        ///// Method FillTVehicalRecordStatus to fill the vehicle status dropdown.
        ///// </summary>
        ///// <param name="NA"></param>
        ///// <returns>void</returns>
        ///// <createdBy></createdBy>
        ///// <createdOn>Apr-13,2016</createdOn>
        //public void OutsideCarrierDdl(object obj)
        //{
        //    CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgStart, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
        //    try
        //    {

        //        List<string> List = _serviceInstance.OutsideCarrier().ToList();
        //        List.Insert(0, "All");
        //        OutsideCarrierList = null;
        //        OutsideCarrierList = List;

        //    }
        //    catch (Exception ex)
        //    {
        //        bool displayErrorOnUI = false;
        //        CommonSettings.logger.LogError(this.GetType(), ex);
        //        if (displayErrorOnUI)
        //        { throw; }
        //    }
        //    finally
        //    {
        //        CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgEnd, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
        //    }
        //}
        #endregion



        /// <summary>
        /// Function to FIll Customer Data on row selection.
        /// </summary>
        /// <param name="objLoginProp"></param>
        /// <returns>void</returns>
        /// <createdBy></createdBy>
        /// <createdOn>May 10,2016</createdOn>
        private void FillData(object obj)
        {
            CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgStart, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
            try
            {
                ObservableCollection <object> objSel  = (ObservableCollection <object>)SelectedItems;
                List <BillingFindVM>          objList = new List <BillingFindVM>();
                foreach (BillingModel Vl in objSel)
                {
                    BillingFindVM objBillingFind = new BillingFindVM(null);
                    objBillingFind.BillingID      = Vl.BillingID;
                    objBillingFind.CustomerName   = Vl.CustomerName;
                    objBillingFind.BillingID      = Vl.BillingID;
                    objBillingFind.InvoiceNumber  = Vl.InvoiceNumber;
                    objBillingFind.CustomerName   = Vl.CustomerName;
                    objBillingFind.CustomerNumber = Vl.CustomerNumber;
                    objBillingFind.Vin            = Vl.VIN;
                    objBillingFind.CustIndent     = Vl.CustIndent;

                    objBillingFind.InvoiceDate   = Vl.InvoiceDate;
                    objBillingFind.InvoiceStatus = Vl.InvoiceStatus;
                    objBillingFind.InvoiceType   = Vl.InvoiceType;


                    objBillingFind.Address = Vl.Address;
                    TotalPageCount         = Vl.TotalPageCount;
                    objList.Add(objBillingFind);

                    //objBillingFind.Driver = Vl.Driver;
                    //objBillingFind.LoadNumber = Vl.LoadNumber;
                    //objBillingFind.OutsideCarrier = Vl.OutsideCarrier;
                    //objBillingFind.PONumber = Vl.PONumber;
                    //objBillingFind.OrderNumber = Vl.OrderNumber;
                    //objBillingFind.CarrierName = Vl.CarrierName;
                }

                DelegateEventBillingPeriod.SetValueListMethod(objList);
            }
            catch (Exception ex)
            {
                LogHelper.LogErrorToDb(ex);
                bool displayErrorOnUI = false;
                CommonSettings.logger.LogError(this.GetType(), ex);
                if (displayErrorOnUI)
                {
                    throw;
                }
            }

            finally
            {
                CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgEnd, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
            }
        }
示例#2
0
        /// <summary>
        /// Method Continue to get the details of selected item.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>void</returns>
        /// <createdBy></createdBy>
        /// <createdOn>Apr-13,2016</createdOn>
        public void Continue(object obj)
        {
            CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgStart, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
            try
            {
                if (SelectedItems.Count > 0)
                {
                    ObservableCollection <object> objSel  = (ObservableCollection <object>)SelectedItems;
                    List <BillingFindVM>          objList = new List <BillingFindVM>();
                    foreach (BillingModel Vl in objSel)
                    {
                        BillingFindVM objBillingFind = new BillingFindVM(null);
                        objBillingFind.BillingID      = Vl.BillingID;
                        objBillingFind.CustomerName   = Vl.CustomerName;
                        objBillingFind.BillingID      = Vl.BillingID;
                        objBillingFind.InvoiceNumber  = Vl.InvoiceNumber;
                        objBillingFind.CustomerName   = Vl.CustomerName;
                        objBillingFind.CustomerNumber = Vl.CustomerNumber;
                        objBillingFind.Vin            = Vl.VIN;
                        objBillingFind.CustIndent     = Vl.CustIndent;
                        objBillingFind.InvoiceDate    = Vl.InvoiceDate;
                        objBillingFind.InvoiceStatus  = Vl.InvoiceStatus;
                        objBillingFind.InvoiceType    = Vl.InvoiceType;
                        objBillingFind.Address        = Vl.Address;
                        TotalPageCount = Vl.TotalPageCount;
                        objList.Add(objBillingFind);
                        //objBillingFind.PONumber = Vl.PONumber;
                        //objBillingFind.OrderNumber = Vl.OrderNumber;
                        //objBillingFind.LoadNumber = Vl.LoadNumber;
                        //objBillingFind.OutsideCarrier = Vl.OutsideCarrier;
                        //objBillingFind.Driver = Vl.Driver;
                    }

                    DelegateEventBillingPeriod.SetValueListMethod(objList);

                    foreach (Window window in Application.Current.Windows)
                    {
                        if (window.Title.Equals("Invoice Record Find", StringComparison.OrdinalIgnoreCase))
                        {
                            window.Close();
                        }
                    }
                }
                else
                {
                    MessageBox.Show(Resources.MsgSelectUser);
                }
            }
            catch (Exception ex)
            {
                LogHelper.LogErrorToDb(ex);
                bool displayErrorOnUI = false;
                CommonSettings.logger.LogError(this.GetType(), ex);
                if (displayErrorOnUI)
                {
                    throw;
                }
            }
            finally
            {
                CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgEnd, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
            }
        }