public void AutoGenTransferLimit(DateTime dt, string userId)
        {
            var           mats = _rawMatRepo.List();
            StringBuilder qry  = new StringBuilder();

            foreach (var mat in mats)
            {
                var tLimit = new TransferLimitViewModel();
                tLimit.DateCreated     = DateTime.Now;
                tLimit.EffectiveDate   = dt;
                tLimit.ShiftId         = 1;
                tLimit.RawMaterialId   = mat.RawMaterialId;
                tLimit.ComputedLimitKg = 0;
                tLimit.CreatedBy       = userId;
                Create(tLimit);

                tLimit.ShiftId = 2;
                Create(tLimit);
            }
        }
示例#2
0
        public IEnumerable <RawMaterial> Get()
        {
            var model = _repository.List().OrderBy(a => a.RawMaterialDesc).ToList();

            return(model);
        }