private void InitData()
        {
            GeneralParameter = new GeneralParameterModel {
                ParamBeginDate = DateTime.Now.Date
            };                                                                                  // ProductionDate;

            Filter = new BatchBomRequestQueryParameterModel
            {
                ProductionDate1 = DateTime.Now.Date,
                ProductionDate2 = DateTime.Now.Date
            };

            InventoryLists = new ObservableCollection <MaterialTimelyInventoryModel>();
            BatchBomRequestSummaryLists = new ObservableCollection <BatchBomRequestSummaryModel>();
            DeliverTransferLists        = new ObservableCollection <MaterialTimelyInventoryModel>();
            HostConfig = CommonService.GetHostConfig(Menu.ID, HostName, User.ID) ?? new HostConfigModel()
            {
                TypeId = Menu.ID, Host = HostName, UserId = User.ID, TypeDesciption = Menu.TB2Text
            };
            DeliveryStockLists = CommonService.GetDeliveryStock();
            //Task.Factory.StartNew(() =>
            //{
            //    UIExecute.RunAsync(() =>
            //    {

            //        QueryBaseCommand.Execute(null);

            //    });
            //});
        }
 public void DataInit()
 {
     GeneralParameter = new GeneralParameterModel {
         ParamBeginDate = DateTime.Now.AddDays(1 - DateTime.Now.Day).AddMonths(-1), ParamEndDate = DateTime.Now.Date
     };
     Task.Factory.StartNew(() =>
     {
         UIExecute.RunAsync(GetShippingBills);
         UIExecute.RunAsync(InitQueryConSignmentBill);
     });
 }
Пример #3
0
 public ProductionDeptIndexPageViewModel()
 {
     _service   = new ProductionDeptIndexPageService();
     HostConfig = CommonService.GetHostConfig(5, HostName, User.ID) ?? new HostConfigModel()
     {
         TypeId = 5, Host = HostName, UserId = User.ID, TypeDesciption = "投入产出率"
     };
     DelegateCommandInit();
     GeneralParameter = new GeneralParameterModel()
     {
         ParamBeginDate = DateTime.Now.AddMonths(-1).AddDays(1 - DateTime.Now.Day).Date,
         ParamEndDate   = DateTime.Now.AddMonths(-1).AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1)
     };
 }
Пример #4
0
        public DataTable GetShippingBillExprotDataTable2(int userDataId, GeneralParameterModel generalParameter)
        {
            string sql;

            if (userDataId == -1)
            {
                sql = $" select * from SJShippingBillExportView2 where 托运日期 between '{generalParameter.ParamBeginDate}' and '{generalParameter.ParamEndDate}' order by 系统单号,明细序号;";
            }
            else
            {
                sql = $" select * from SJShippingBillExportView2 where UserId=@UserId and 托运日期 between '{generalParameter.ParamBeginDate}' and '{generalParameter.ParamEndDate}'  order by 系统单号,明细序号";
            }

            return(SqlHelper.ExecuteDataTable(sql, new SqlParameter[] { new SqlParameter("@UserId", userDataId) }));
        }
Пример #5
0
        public IList <ShippingBillModel> GetAllShippingBills(int userDataId, GeneralParameterModel generalParameter)
        {
            string sql;

            if (userDataId == -1)
            {
                sql = $"select *, (select UserName from SJUser  where Id= a.UserId) UserName from SJShippingBill a where BillDate between '{generalParameter.ParamBeginDate}' and  '{generalParameter.ParamEndDate}' order by Id desc ";
            }
            else
            {
                sql = $"select * , (select UserName from SJUser  where Id= a.UserId) UserName from SJShippingBill a where BillDate between '{generalParameter.ParamBeginDate}' and  '{generalParameter.ParamEndDate}' and UserId=@UserDataId order by Id desc ";
            }
            using (var connection = SqlDb.UpdateConnection)
            {
                return(connection.Query <ShippingBillModel>(sql, new { UserDataId = userDataId }).ToList());
            }
        }
 public GeneralParameterController(GeneralParameterModel model, IGeneralParameterView view)
 {
     this.model = model;
     SubscribeView(view);
 }
Пример #7
0
 public GlobalSettingsModel()
 {
     GeneralParameterModel = new GeneralParameterModel();
     EditorUIModel         = new EditorUIModel();
     EditorModel           = new EditorModel();
 }
Пример #8
0
        public DataTable GetShippingBillExprotDataTable3(int userDataId, string orderedColumns, GeneralParameterModel generalParameter)
        {
            string sql;

            if (userDataId == -1)
            {
                sql = $" select dense_rank()over( order by " + orderedColumns + $") 组号 ,* from SJShippingBillExportView1 where 托运日期 between '{generalParameter.ParamBeginDate}' and '{generalParameter.ParamEndDate}' ; ";
            }
            else
            {
                sql = $" select dense_rank()over( order by " + orderedColumns + $") 组号 ,* from SJShippingBillExportView1 where UserId=@UserId and 托运日期 between '{generalParameter.ParamBeginDate}' and '{generalParameter.ParamEndDate}' ;";
            }

            return(SqlHelper.ExecuteDataTable(sql, new SqlParameter[] { new SqlParameter("@UserId", userDataId) }));
        }