public void Update(int PoLogId, int QuoteId, int OrderId, int?OrderNo, int?UserId, int?CompanyId, DateTime?LogDate, byte[] LogTs) { PriceOrderLog item = new PriceOrderLog(); item.MarkOld(); item.IsLoaded = true; item.PoLogId = PoLogId; item.QuoteId = QuoteId; item.OrderId = OrderId; item.OrderNo = OrderNo; item.UserId = UserId; item.CompanyId = CompanyId; item.LogDate = LogDate; item.LogTs = LogTs; item.Save(UserName); }
//end default view /// <summary> /// update pricer with linked order id and order table with the quote id /// </summary> /// <param name="orderid">int32 orderid from grid</param> /// <returns></returns> protected bool save_to_quote(Int32 orderid, Int32 orderno, Int32 quoteid) { bool _result = false; int recordsaffected = 0; //save orderid to price values if (orderid > 0 && quoteid > 0) { //append to audit log UserClass _thisuser = (UserClass)Session["user"]; DAL.Pricer.PriceOrderLog _oq = new DAL.Pricer.PriceOrderLog(); _oq.CompanyId = _thisuser.CompanyId; _oq.UserId = _thisuser.UserId; _oq.QuoteId = quoteid; _oq.LogDate = DateTime.Now; _oq.OrderId = orderid; _oq.OrderNo = orderno; _oq.Save(); //get log id Int32 _newid = (Int32)_oq.GetPrimaryKeyValue(); //save log id to price table SubSonic.Update upd1 = new SubSonic.Update(DAL.Pricer.Schemas.PriceValue); recordsaffected = upd1.Set("po_log_id").EqualTo(_newid) .Where("quote_id").IsEqualTo(quoteid) .Execute(); //save quote id to order table SubSonic.Update upd2 = new SubSonic.Update(DAL.Logistics.Schemas.OrderTable); recordsaffected = upd2.Set("quote_id").EqualTo(quoteid) .Where("OrderID").IsEqualTo(orderid) .Execute(); if (recordsaffected > 0) { _result = true; } } return(_result); }
public void Insert(int QuoteId, int OrderId, int?OrderNo, int?UserId, int?CompanyId, DateTime?LogDate, byte[] LogTs) { PriceOrderLog item = new PriceOrderLog(); item.QuoteId = QuoteId; item.OrderId = OrderId; item.OrderNo = OrderNo; item.UserId = UserId; item.CompanyId = CompanyId; item.LogDate = LogDate; item.LogTs = LogTs; item.Save(UserName); }
public bool Destroy(object PoLogId) { return(PriceOrderLog.Destroy(PoLogId) == 1); }
public bool Delete(object PoLogId) { return(PriceOrderLog.Delete(PoLogId) == 1); }
//end default view /// <summary> /// update pricer with linked order id and order table with the quote id /// </summary> /// <param name="orderid">int32 orderid from grid</param> /// <returns></returns> protected bool save_to_quote(Int32 orderid, Int32 orderno, Int32 quoteid) { bool _result = false; int recordsaffected = 0; //save orderid to price values if (orderid > 0 && quoteid > 0) { //append to audit log UserClass _thisuser = (UserClass)Session["user"]; DAL.Pricer.PriceOrderLog _oq = new DAL.Pricer.PriceOrderLog(); _oq.CompanyId = _thisuser.CompanyId; _oq.UserId = _thisuser.UserId; _oq.QuoteId = quoteid; _oq.LogDate = DateTime.Now; _oq.OrderId = orderid; _oq.OrderNo = orderno; _oq.Save(); //get log id Int32 _newid = (Int32)_oq.GetPrimaryKeyValue(); //save log id to price table SubSonic.Update upd1 = new SubSonic.Update(DAL.Pricer.Schemas.PriceValue); recordsaffected = upd1.Set("po_log_id").EqualTo(_newid) .Where("quote_id").IsEqualTo(quoteid) .Execute(); //save quote id to order table SubSonic.Update upd2 = new SubSonic.Update(DAL.Logistics.Schemas.OrderTable); recordsaffected = upd2.Set("quote_id").EqualTo(quoteid) .Where("OrderID").IsEqualTo(orderid) .Execute(); if (recordsaffected > 0) { _result = true; } } return _result; }