/// <summary> /// Parent Constructor /// </summary> /// <param name="ctl">lot control</param> /// <param name="M_Product_ID">product</param> /// <param name="Name">name</param> public MLot(MLotCtl ctl, int M_Product_ID, String Name) : this(ctl.GetCtx(), 0, ctl.Get_TrxName()) { SetClientOrg(ctl); SetM_LotCtl_ID(ctl.GetM_LotCtl_ID()); SetM_Product_ID(M_Product_ID); SetName(Name); }
/** * Create Lot * @param M_Product_ID product used if new * @return lot info */ public KeyNamePair CreateLot(int M_Product_ID) { KeyNamePair retValue = null; int M_LotCtl_ID = GetMAttributeSet().GetM_LotCtl_ID(); if (M_LotCtl_ID != 0) { MLotCtl ctl = new MLotCtl(GetCtx(), M_LotCtl_ID, null); MLot lot = ctl.CreateLot(M_Product_ID); SetM_Lot_ID(lot.GetM_Lot_ID()); SetLot(lot.GetName()); retValue = new KeyNamePair(lot.GetM_Lot_ID(), lot.GetName()); } return(retValue); }