750 lines
18 KiB
C#
750 lines
18 KiB
C#
///////////////////////////////////////////////////////////
|
|
// PurchaseOrderItem.cs
|
|
// Implementation of Class PurchaseOrderItem
|
|
// CSLA type: Editable Child
|
|
// Created on: 07-Jun-2004 8:41:31 AM
|
|
// Object design: Joyce
|
|
// Coded: John 19-July-2004
|
|
///////////////////////////////////////////////////////////
|
|
|
|
using System;
|
|
using System.Data;
|
|
using CSLA.Data;
|
|
using GZTW.Data;
|
|
using CSLA;
|
|
using System.Threading;
|
|
using CSLA.Security;
|
|
|
|
|
|
namespace GZTW.AyaNova.BLL
|
|
{
|
|
/// <summary>
|
|
/// Indivdual item (part) that is selected to be in the PO
|
|
/// </summary>
|
|
[Serializable]
|
|
public class PurchaseOrderItem : BusinessBase
|
|
{
|
|
|
|
#region Attributes
|
|
|
|
internal bool bReadOnly;
|
|
|
|
private Guid mID;
|
|
private Guid mCreator;
|
|
private Guid mModifier;
|
|
private SmartDate mCreated;
|
|
private SmartDate mModified;
|
|
|
|
private Guid mPurchaseOrderID;
|
|
|
|
private Guid mPartID;
|
|
private decimal mQuantityOrdered;
|
|
private decimal mPurchaseOrderCost;
|
|
private Guid mPurchaseTaxCodeID;
|
|
private decimal mQuantityReceived;
|
|
private bool mClosed;
|
|
|
|
private Guid mPartWarehouseID=PartWarehouse.DefaultWarehouseID;
|
|
|
|
|
|
|
|
//ID of workorder item part request if that's the source
|
|
//else it's guid empty
|
|
internal Guid mWorkorderItemPartRequestID;
|
|
|
|
//track who requested a part in case the original
|
|
//request get's deleted after parts are ordered
|
|
internal Guid mPartRequestedByID;
|
|
|
|
|
|
|
|
//Some read only helper fields for UI display
|
|
// private string mPartNumber="";
|
|
// private string mPartManufacturerNumber="";
|
|
// private string mPartWholesalerNumber="";
|
|
// private string mPartAlternativeWholesalerNumber="";
|
|
// private decimal mPartCost=0;
|
|
// private string mPartManufacturerName="";
|
|
private int mWorkorderNumber=0;
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
#region Constructor
|
|
private PurchaseOrderItem()
|
|
{
|
|
//Set to read / write initially so that properties
|
|
//can be set
|
|
bReadOnly=false;
|
|
|
|
//Child object
|
|
MarkAsChild();
|
|
|
|
//New ID
|
|
mID = Guid.NewGuid();
|
|
|
|
mWorkorderItemPartRequestID=Guid.Empty;
|
|
|
|
|
|
//Default warehouse
|
|
mPartWarehouseID=PartWarehouse.DefaultWarehouseID;
|
|
|
|
//Default tax
|
|
mPurchaseTaxCodeID=AyaBizUtils.GlobalSettings.TaxPartPurchaseID;
|
|
|
|
//Set record history to defaults
|
|
mCreated = new SmartDate(DBUtil.CurrentWorkingDateTime);
|
|
mModified=new SmartDate();
|
|
mCreator=Guid.Empty;
|
|
mModifier=Guid.Empty;
|
|
|
|
//case 1918
|
|
//default for override
|
|
OverrideIsLockedForInternalUpdate = false;
|
|
}
|
|
#endregion
|
|
|
|
#region BusinessProperties
|
|
|
|
//---Common properties
|
|
/// <summary>
|
|
/// Initial created date of this object
|
|
/// </summary>
|
|
public string Created
|
|
{
|
|
get
|
|
{
|
|
return mCreated.ToString();
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// User ID of who initially created this object
|
|
/// </summary>
|
|
public Guid Creator
|
|
{
|
|
get
|
|
{
|
|
return mCreator;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Last modified date of this object
|
|
/// </summary>
|
|
public string Modified
|
|
{
|
|
get
|
|
{
|
|
return mModified.ToString();
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// User ID of who last modified this object
|
|
/// </summary>
|
|
public Guid Modifier
|
|
{
|
|
get
|
|
{
|
|
return mModifier;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Unique ID of this object
|
|
/// </summary>
|
|
public Guid ID
|
|
{
|
|
get
|
|
{
|
|
return mID;
|
|
}
|
|
}
|
|
|
|
|
|
//---PurchaseOrderItem specific properties
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// GUID of Warehouse this ordered part(s) is destined for
|
|
/// </summary>
|
|
public Guid PartWarehouseID
|
|
{
|
|
get
|
|
{
|
|
return mPartWarehouseID;
|
|
}
|
|
set
|
|
{
|
|
if(bReadOnly || IsLocked)
|
|
ThrowSetError();
|
|
else
|
|
{
|
|
if(mPartWarehouseID!=value)
|
|
{
|
|
mPartWarehouseID = value;
|
|
BrokenRules.Assert("WarehouseRequired",
|
|
"Error.Object.RequiredFieldEmpty,O.PartWarehouse",
|
|
"PartWarehouseID",value==Guid.Empty);
|
|
MarkDirty();
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// Taxcode ID to use to apply against items Default value is taken from Part record
|
|
/// </summary>
|
|
public Guid PurchaseTaxCodeID
|
|
{
|
|
get
|
|
{
|
|
return mPurchaseTaxCodeID;
|
|
}
|
|
set
|
|
{
|
|
if(bReadOnly /*|| IsLocked*/)//case 1326
|
|
ThrowSetError();
|
|
else
|
|
{
|
|
if(mPurchaseTaxCodeID!=value)
|
|
{
|
|
mPurchaseTaxCodeID = value;
|
|
BrokenRules.Assert("TaxCodeRequired",
|
|
"Error.Object.RequiredFieldEmpty,O.TaxCode",
|
|
"PurchaseTaxCodeID",value==Guid.Empty);
|
|
MarkDirty();
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// ID of part ordered
|
|
/// </summary>
|
|
public Guid PartID
|
|
{
|
|
get
|
|
{
|
|
return mPartID;
|
|
}
|
|
set
|
|
{
|
|
if(bReadOnly || IsLocked)
|
|
ThrowSetError();
|
|
else
|
|
{
|
|
if(mPartID!=value)
|
|
{
|
|
mPartID = value;
|
|
MarkDirty();
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Item closed
|
|
/// </summary>
|
|
public bool Closed
|
|
{
|
|
get
|
|
{
|
|
return mClosed;
|
|
}
|
|
set
|
|
{
|
|
if(bReadOnly)
|
|
ThrowSetError();
|
|
else
|
|
{
|
|
if(mClosed!=value)
|
|
{
|
|
mClosed = value;
|
|
MarkDirty();
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Quantity received for this item
|
|
/// </summary>
|
|
public decimal QuantityReceived
|
|
{
|
|
get
|
|
{
|
|
return mQuantityReceived;
|
|
}
|
|
set
|
|
{
|
|
if(bReadOnly)
|
|
ThrowSetError();
|
|
else
|
|
{
|
|
if(mQuantityReceived!=value)
|
|
{
|
|
mQuantityReceived = value;
|
|
//must receive a quantity
|
|
BrokenRules.Assert("QuantityReceivedRequired",
|
|
"Error.Object.RequiredFieldEmpty,PurchaseOrderItem.Label.QuantityReceived",
|
|
"QuantityReceived",value<1);
|
|
MarkDirty();
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Quantity ordered
|
|
/// </summary>
|
|
public decimal QuantityOrdered
|
|
{
|
|
get
|
|
{
|
|
return mQuantityOrdered;
|
|
}
|
|
set
|
|
{
|
|
if(bReadOnly || IsLocked)
|
|
ThrowSetError();
|
|
else
|
|
{
|
|
if(mQuantityOrdered!=value)
|
|
{
|
|
mQuantityOrdered = value;
|
|
MarkDirty();
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// PurchaseOrderCost per indvidual or unit of part Updates Part object when received
|
|
/// </summary>
|
|
public decimal PurchaseOrderCost
|
|
{
|
|
get
|
|
{
|
|
return mPurchaseOrderCost;
|
|
}
|
|
set
|
|
{
|
|
if(bReadOnly /*|| IsLocked*/)
|
|
ThrowSetError();
|
|
else
|
|
{
|
|
if(mPurchaseOrderCost!=value)
|
|
{
|
|
mPurchaseOrderCost = value;
|
|
MarkDirty();
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// Method to flag a quantity of PO items received and close if all received
|
|
/// </summary>
|
|
/// <param name="Quantity"></param>
|
|
public void Receive(decimal Quantity)
|
|
{
|
|
throw new ApplicationException("PurchaseOrderItem:Receive method not coded");
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// Workorder number
|
|
/// </summary>
|
|
public int WorkorderNumber
|
|
{
|
|
get
|
|
{
|
|
return mWorkorderNumber;
|
|
}
|
|
set
|
|
{
|
|
mWorkorderNumber=value;
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// ID of WorkorderItem from which this part was requested to be ordered
|
|
/// used internally in code
|
|
/// </summary>
|
|
public Guid WorkorderItemPartRequestID
|
|
{
|
|
get
|
|
{
|
|
return mWorkorderItemPartRequestID;
|
|
}
|
|
set
|
|
{
|
|
if(bReadOnly)
|
|
ThrowSetError();
|
|
else
|
|
{
|
|
if(mWorkorderItemPartRequestID!=value)
|
|
{
|
|
mWorkorderItemPartRequestID = value;
|
|
MarkDirty();
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// ID of user who requested part on workorderitempartrequest
|
|
/// replicated here in case original workorderitempartrequest record
|
|
/// is removed *after* parts are ordered as an audit
|
|
/// </summary>
|
|
public Guid PartRequestedByID
|
|
{
|
|
get
|
|
{
|
|
return mPartRequestedByID;
|
|
}
|
|
set
|
|
{
|
|
if(bReadOnly)
|
|
ThrowSetError();
|
|
else
|
|
{
|
|
if(mPartRequestedByID!=value)
|
|
{
|
|
mPartRequestedByID = value;
|
|
MarkDirty();
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// ID of PO
|
|
/// </summary>
|
|
public Guid PurchaseOrderID
|
|
{
|
|
get
|
|
{
|
|
return mPurchaseOrderID;
|
|
}
|
|
set
|
|
{
|
|
if(bReadOnly)
|
|
ThrowSetError();
|
|
else
|
|
{
|
|
if(mPurchaseOrderID!=value)
|
|
{
|
|
mPurchaseOrderID = value;
|
|
MarkDirty();
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
//Read only UI helper fields
|
|
|
|
// public string PartNumber {get{return mPartNumber;}}
|
|
// public string PartManufacturerNumber {get{return mPartManufacturerNumber;}}
|
|
// public string PartWholesalerNumber {get{return mPartWholesalerNumber;}}
|
|
// public string PartAlternativeWholesalerNumber {get{return mPartAlternativeWholesalerNumber;}}
|
|
// public string PartManufacturerName {get{return mPartManufacturerName;}}
|
|
// public decimal PartCost {get{return mPartCost;}}
|
|
|
|
|
|
/// <summary>
|
|
///Used to indicate that this record
|
|
///is locked because it was generated from a part request so
|
|
///most fields become read only
|
|
/// </summary>
|
|
public bool IsLocked
|
|
{
|
|
get
|
|
{
|
|
//case 1918
|
|
if (OverrideIsLockedForInternalUpdate) return false;
|
|
|
|
if(mWorkorderItemPartRequestID!=Guid.Empty)
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
//case 1918 override for lock
|
|
internal bool OverrideIsLockedForInternalUpdate { get; set; }
|
|
|
|
/// <summary>
|
|
/// Throw an error when a read only user
|
|
/// tries to set a property
|
|
/// (this should normally never be called unless someone is using the developer api since the UI
|
|
/// should prevent it from happening initially)
|
|
/// </summary>
|
|
private void ThrowSetError()
|
|
{
|
|
throw new System.Security.SecurityException
|
|
(
|
|
string.Format
|
|
(
|
|
LocalizedTextTable.GetLocalizedTextDirect("Error.Security.NotAuthorizedToChange"),
|
|
LocalizedTextTable.GetLocalizedTextDirect("O.PurchaseOrderItem")
|
|
)
|
|
);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region System.object overrides
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public override string ToString()
|
|
{
|
|
return "PurchaseOrderItem" + mID.ToString();
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="obj"></param>
|
|
/// <returns></returns>
|
|
public override bool Equals(Object obj)
|
|
{
|
|
if ( obj == null || GetType ( ) != obj.GetType ( ) ) return false;
|
|
PurchaseOrderItem c=(PurchaseOrderItem)obj;
|
|
return mID==c.mID;
|
|
}
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public override int GetHashCode()
|
|
{
|
|
return ("PurchaseOrderItem" + mID).GetHashCode();
|
|
}
|
|
#endregion
|
|
|
|
#region Static methods
|
|
/// <summary>
|
|
/// Create item
|
|
/// </summary>
|
|
/// <param name="obj">Parent ID</param>
|
|
/// <returns>New Item</returns>
|
|
internal static PurchaseOrderItem NewItem(PurchaseOrder obj)
|
|
{
|
|
|
|
if(AyaBizUtils.Right("Object.PurchaseOrder")>(int)SecurityLevelTypes.ReadOnly)
|
|
{
|
|
PurchaseOrderItem child=new PurchaseOrderItem();
|
|
child.mPurchaseOrderID=obj.ID;
|
|
return child;
|
|
}
|
|
else
|
|
throw new System.Security.SecurityException(
|
|
string.Format(
|
|
LocalizedTextTable.GetLocalizedTextDirect("Error.Security.NotAuthorizedToCreate"),
|
|
LocalizedTextTable.GetLocalizedTextDirect("O.PurchaseOrderItem")));
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// Retrieve item
|
|
/// </summary>
|
|
/// <param name="dr">Data reader</param>
|
|
/// <returns>item from database</returns>
|
|
internal static PurchaseOrderItem GetItem(SafeDataReader dr)
|
|
{
|
|
|
|
|
|
if(AyaBizUtils.Right("Object.PurchaseOrder")>(int)SecurityLevelTypes.NoAccess)
|
|
{
|
|
PurchaseOrderItem child = new PurchaseOrderItem();
|
|
child.Fetch(dr);
|
|
return child;
|
|
}
|
|
else
|
|
throw new System.Security.SecurityException(
|
|
string.Format(
|
|
LocalizedTextTable.GetLocalizedTextDirect("Error.Security.NotAuthorizedToRetrieve"),
|
|
LocalizedTextTable.GetLocalizedTextDirect("O.PurchaseOrderItem")));
|
|
}
|
|
#endregion
|
|
|
|
#region DAL DATA ACCESS
|
|
|
|
#region Fetch
|
|
/// <summary>
|
|
/// Fetch from db
|
|
/// </summary>
|
|
/// <param name="dr"></param>
|
|
private void Fetch(SafeDataReader dr)
|
|
{
|
|
//Standard items
|
|
mCreated=DBUtil.ToLocal(dr.GetSmartDate("aCreated"));
|
|
mCreator=dr.GetGuid("aCreator");
|
|
mModified=DBUtil.ToLocal(dr.GetSmartDate("aModified"));
|
|
mModifier=dr.GetGuid("aModifier");
|
|
mID=dr.GetGuid("aID");
|
|
|
|
|
|
//PurchaseOrderItem specific parameters
|
|
mPurchaseOrderID=dr.GetGuid("aPurchaseOrderID");
|
|
mPartID=dr.GetGuid("aPartID");
|
|
mClosed=dr.GetBoolean("aClosed");
|
|
mPurchaseOrderCost=dr.GetDecimal("aPurchaseOrderCost");
|
|
|
|
mPartWarehouseID=dr.GetGuid("aPartWarehouseID");
|
|
mQuantityOrdered=dr.GetDecimal("aQuantityOrdered");
|
|
mQuantityReceived=dr.GetDecimal("aQuantityReceived");
|
|
mPurchaseTaxCodeID=dr.GetGuid("aPurchaseTaxCodeID");
|
|
mWorkorderItemPartRequestID=dr.GetGuid("aWorkorderItemPartRequestID");
|
|
mWorkorderNumber=dr.GetInt32("aServiceNumber");
|
|
|
|
this.mPartRequestedByID=dr.GetGuid("aPartRequestedByID");
|
|
//Read only UI helper fields
|
|
// this.mPartNumber=dr.GetString("aPartNumber");
|
|
// this.mPartManufacturerNumber=dr.GetString("aManufacturerNumber");
|
|
// this.mPartWholesalerNumber=dr.GetString("aWholesalerNumber");
|
|
// this.mPartAlternativeWholesalerNumber=dr.GetString("AALTERNATIVEWHOLESALERNUMBER");
|
|
// this.mPartManufacturerName=dr.GetString("aMANUFACTURERNAME");
|
|
// this.mPartCost=dr.GetDecimal("aPARTCOST");
|
|
this.mWorkorderNumber=dr.GetInt32("aServiceNumber");
|
|
|
|
|
|
|
|
//Get access rights level
|
|
bReadOnly=AyaBizUtils.Right("Object.PurchaseOrder")<(int)SecurityLevelTypes.ReadWrite;
|
|
|
|
MarkOld();
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region Update
|
|
/// <summary>
|
|
/// Persist object to database
|
|
/// </summary>
|
|
/// <param name="obj">Parent object</param>
|
|
/// <param name="tr">Parents transaction object</param>
|
|
internal void Update(PurchaseOrder obj,IDbTransaction tr)
|
|
{
|
|
//No need to update if there is nothing changed
|
|
if(!this.IsDirty) return;
|
|
|
|
// If not a new record, check if record was modified
|
|
//by another user since original retrieval:
|
|
if(!IsNew)
|
|
DBUtil.CheckSafeToUpdateInsideTransaction(this.mModified.Date,this.mID,"aPurchaseOrderItem",tr);//case 564
|
|
//DBUtil.CheckSafeToUpdate(this.mModified.Date,this.mID,"aPurchaseOrderItem");
|
|
#region Delete
|
|
if(IsDeleted)
|
|
{
|
|
if(!IsNew)
|
|
{
|
|
//Delete object and child objects
|
|
DBCommandWrapper cmDelete = DBUtil.GetCommandFromSQL("DELETE FROM aPurchaseOrderItem WHERE aID = @ID;");
|
|
cmDelete.AddInParameter("@ID",DbType.Guid,this.mID);
|
|
DBUtil.DB.ExecuteNonQuery(cmDelete, tr);
|
|
}
|
|
MarkNew();
|
|
return;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Add / Update
|
|
|
|
//get modification time temporarily, if update succeeds then
|
|
//set to this time
|
|
System.DateTime dtModified = DBUtil.CurrentWorkingDateTime;
|
|
|
|
DBCommandWrapper cm = null;
|
|
if(IsNew)//Add or update?
|
|
cm=DBUtil.GetCommandFromSQL(
|
|
"INSERT INTO aPurchaseOrderItem (aPurchaseOrderID, aID, " +
|
|
"aPartID, aQuantityOrdered, aPurchaseOrderCost, aPurchaseTaxCodeID, aQuantityReceived, " +
|
|
"aClosed, aWorkorderItemPartRequestID, " +
|
|
"aPartWarehouseID, aPartRequestedByID, aCreated,aModified,aCreator,aModifier) " +
|
|
"VALUES (@PurchaseOrderID,@ID,@PartID,@QuantityOrdered, " +
|
|
"@PurchaseOrderCost,@PurchaseTaxCodeID, @QuantityReceived,@Closed,@WorkorderItemPartRequestID, " +
|
|
"@PartWarehouseID,@PartRequestedByID,@Created,@Modified,@CurrentUserID, " +
|
|
"@CurrentUserID)"
|
|
);
|
|
else
|
|
cm=DBUtil.GetCommandFromSQL(
|
|
"UPDATE aPurchaseOrderItem SET aPurchaseOrderID=@PurchaseOrderID, " +
|
|
"aID=@ID, aPartID=@PartID, aQuantityOrdered=@QuantityOrdered, " +
|
|
"aPurchaseOrderCost=@PurchaseOrderCost, aPurchaseTaxCodeID=@PurchaseTaxCodeID, " +
|
|
"aQuantityReceived=@QuantityReceived, aClosed=@Closed, " +
|
|
"aWorkorderItemPartRequestID=@WorkorderItemPartRequestID, aPartWarehouseID=@PartWarehouseID, " +
|
|
"aPartRequestedByID = @PartRequestedByID, " +
|
|
"aModifier=@CurrentUserID, aModified=@Modified " +
|
|
"WHERE aID=@ID"
|
|
);
|
|
|
|
|
|
//Purchase order item fields
|
|
cm.AddInParameter("@ID",DbType.Guid,this.mID);
|
|
cm.AddInParameter("@PurchaseOrderID",DbType.Guid,mPurchaseOrderID);
|
|
cm.AddInParameter("@PartID",DbType.Guid,mPartID);
|
|
cm.AddInParameter("@Closed",DbType.Boolean,mClosed);
|
|
cm.AddInParameter("@PurchaseOrderCost",DbType.Decimal,mPurchaseOrderCost);
|
|
cm.AddInParameter("@PartWarehouseID",DbType.Guid,mPartWarehouseID);
|
|
cm.AddInParameter("@QuantityOrdered",DbType.Decimal,mQuantityOrdered);
|
|
cm.AddInParameter("@QuantityReceived",DbType.Decimal,mQuantityReceived);
|
|
cm.AddInParameter("@PurchaseTaxCodeID",DbType.Guid,mPurchaseTaxCodeID);
|
|
cm.AddInParameter("@WorkorderItemPartRequestID",DbType.Guid,mWorkorderItemPartRequestID);
|
|
cm.AddInParameter("@PartRequestedByID",DbType.Guid,this.mPartRequestedByID);
|
|
|
|
//Standard fields
|
|
cm.AddInParameter("@CurrentUserID",DbType.Guid, CurrentUserID);
|
|
cm.AddInParameter("@Created",DbType.DateTime, DBUtil.ToUTC(mCreated.Date));
|
|
cm.AddInParameter("@Modified",DbType.DateTime, DBUtil.ToUTC(dtModified));
|
|
|
|
DBUtil.DB.ExecuteNonQuery(cm, tr);
|
|
|
|
MarkOld();//db is now synched with object
|
|
//Successful update so
|
|
//change modification time to match
|
|
this.mModified.Date=dtModified;
|
|
#endregion
|
|
|
|
|
|
}
|
|
#endregion update
|
|
|
|
#endregion
|
|
|
|
}//end PurchaseOrderItem
|
|
|
|
}//end namespace GZTW.AyaNova.BLL |