/// <summary> /// Insert a BGHandbookDetail2. /// </summary> public void Insert(Model.BGHandbookDetail2 bGHandbookDetail2) { // // todo:add other logic here // accessor.Insert(bGHandbookDetail2); }
/// <summary> /// Update a BGHandbookDetail2. /// </summary> public void Update(Model.BGHandbookDetail2 bGHandbookDetail2) { // // todo: add other logic here. // accessor.Update(bGHandbookDetail2); }
public bool ExistsExcept(Model.BGHandbookDetail2 e) { Hashtable paras = new Hashtable(); paras.Add("newId", e.Id); paras.Add("oldId", Get(e.BGHandbookDetail2Id) == null?null:Get(e.BGHandbookDetail2Id).Id); return(sqlmapper.QueryForObject <bool>("BGHandbookDetail2.existsexcept", paras)); }
public void UpdateUpQuantity(Model.BGHandbookDetail1 detail)//剩余数量 { //2014年12月15日开始出库单出货后“已出数量”增加,手册成品出货单出货后“已定已出”增加,现在反过来。 double b = Convert.ToDouble(detail.LiLunHaoYongJingSun); detail.UpQuantity = Convert.ToDouble(detail.Quantity) - Convert.ToDouble(detail.BeeQuantity); detail.LiLunHaoYongJing = (double)GetSiSheWuRu(Convert.ToDecimal(detail.BeeQuantity) * Convert.ToDecimal(detail.LjingQuantity), 2); detail.LiLunHaoYongJingSun = (double)GetSiSheWuRu(Convert.ToDecimal(detail.BeeQuantity) * Convert.ToDecimal(detail.LjingQuantity) / (1 - Convert.ToDecimal(detail.Lsunhaolv) * 0.01M), 2); accessor.Update(detail); Model.BGHandbookDetail2 detail2 = Detail2Accessor.SelectBGProduct(detail.BGHandbook.Id, (detail.LId == null ? "" : detail.LId.ToString())); if (detail2 != null) { double a = Convert.ToDouble(detail2.LilunHaoYong) - b; detail2.LilunHaoYong = a + Convert.ToDouble(detail.LiLunHaoYongJingSun); detail2.LilunStock = Convert.ToDouble(detail2.LbejinQuantity) - Convert.ToDouble(detail2.LilunHaoYong); Detail2Accessor.Update(detail2); } }
public bool ExistsExcept(Model.BGHandbookDetail2 e) { return(accessor.ExistsExcept(e)); }
public void Update(Model.BGHandbookDetail2 e) { this.Update <Model.BGHandbookDetail2>(e); }
public void Insert(Model.BGHandbookDetail2 e) { this.Insert <Model.BGHandbookDetail2>(e); }