void bl_OnAutoOrdeer(object sender, EventChangePreReqQuantity e)//изменено { //_shopId using (var oc = unityContainer.Resolve <OrderDataContext>()) { oc.DataBaseContext.sp_ins_AutoOrdered(_shopId, e.GoodsObj.Code); e.GoodsObj.LastOrderDate = DateTime.Now.Date; } }
void BlChangeReqQuantity(object sender, EventChangePreReqQuantity e)//изменено { PreGoodsBalanceObj gb = e.GoodsObj; try { gb.ChangePreReqQuantity -= BlChangeReqQuantity; SaveOrder(gb); } finally { gb.ChangePreReqQuantity += BlChangeReqQuantity; } }