/// <summary> /// 内部调价方法 /// </summary> /// <param name="Accessor"></param> /// <param name="parameters"></param> void InternalSave(IDataAccessor Accessor, params object[] parameters) { IList <CPrice> changePriceList = parameters[0] as IList <CPrice>; IList <Store> storeList = parameters[1] as IList <Store>; DateTime currentTime = new DateTimeService().GetCurrentTime(); foreach (CPrice drugCp in changePriceList) { //记录编号 drugCp.ID = this.GetMaxID(); //drugCp.BillCode = GetBillCode(); drugCp.EventTime = currentTime; //保存调价 drugCp.Insert(); } foreach (Store store in storeList) { //更新库存价格 store.Update(); } }
void InternalDrugPlan(IDataAccessor Accessor, params object[] parameters) { IList <Plan> DrugPlanList = parameters[0] as IList <Plan>; DateTime currentTime = new DateTimeService().GetCurrentTime(); foreach (Plan drugPlan in DrugPlanList) { drugPlan.ID = this.GetMaxID(); drugPlan.EventTime = currentTime; drugPlan.Insert(); } }
public void IniternalSave(IDataAccessor accessor, params object[] parameters) { IList <Store> DrugStoreList = parameters[0] as IList <Store>; IList <PBack> DrugProviderBackList = parameters[1] as IList <PBack>; DateTime currentTime = new DateTimeService().GetCurrentTime(); foreach (PBack drugProviderBack in DrugProviderBackList) { drugProviderBack.EventTime = currentTime; drugProviderBack.Insert(); } foreach (Store drugStore in DrugStoreList) { drugStore.Save(); } }
void InternalDrugPlan(IDataAccessor Accessor, params object[] parameters) { IList <PIn> DrugPlanList = parameters[0] as IList <PIn>; IList <Store> DrugStoreList = parameters[1] as IList <Store>; DateTime currentTime = new DateTimeService().GetCurrentTime(); foreach (PIn drugIn in DrugPlanList) { drugIn.EventTime = currentTime; drugIn.Insert(); } foreach (Store drugStore in DrugStoreList) { drugStore.Save(); } }
void InternalDrugOut(IDataAccessor Accessor, params object[] parameters) { IList <Store> DrugStoreList = parameters[0] as IList <Store>; IList <SOut> DrugOutList = parameters[1] as IList <SOut>; DateTime currentTime = new DateTimeService().GetCurrentTime(); foreach (SOut drugOut in DrugOutList) { drugOut.ID = this.GetMaxID(); drugOut.EventTime = currentTime; drugOut.Insert(); } foreach (Store store in DrugStoreList) { store.Update(); } }
void InternalDrugStoreInsert(IDataAccessor Accessor, params object[] parameters) { IList <Store> DrugStoreList = parameters[0] as IList <Store>; IDrugStoreCountService service = new DrugStoreCountService(); DateTime currentTime = new DateTimeService().GetCurrentTime(); foreach (Store drugStore in DrugStoreList) { Inventory drugCount = new Entities.Inventory(); drugCount.ChinseName = drugStore.ChinseName; drugCount.Code = drugStore.Code; drugCount.DownLimit = drugStore.DownLimit; drugCount.DrugID = drugStore.DrugID; drugCount.InputCode1 = drugStore.InputCode1; drugCount.JobPrice = drugStore.JobPrice; drugCount.Number = drugStore.Number; drugCount.Provider = drugStore.Provider; drugCount.RealNumber = drugStore.Number; drugCount.SalePrice = drugStore.SalePrice; drugCount.Spec = drugStore.Spec; drugCount.State = 0; drugCount.TimeLimit = drugStore.TimeLimit; drugCount.Type = drugStore.Type; drugCount.Unit = drugStore.Unit; drugCount.UpLimit = drugStore.UpLimit; drugCount.EventTime = currentTime; drugCount.BatchID = drugStore.BatchID; drugCount.ID = service.GetMaxID(); drugCount.Insert(); } }