コード例 #1
0
 void OrdersWhereThisIsDeliveryOptionList_OnAfterAdd(object sender, EventArgs e)
 {
     Indico.DAL.Order obj = null;
     if (this.Context != null)
     {
         if (((IndicoList <Indico.BusinessObjects.OrderBO>)sender).Count > 0)
         {
             obj = ((IndicoList <Indico.BusinessObjects.OrderBO>)sender)[((IndicoList <Indico.BusinessObjects.OrderBO>)sender).Count - 1].ObjDAL;
             this.ObjDAL.OrdersWhereThisIsDeliveryOption.Add(obj);
         }
     }
     else
     {
         IndicoContext objContext = new IndicoContext();
         obj = ((IndicoList <Indico.BusinessObjects.OrderBO>)sender)[((IndicoList <Indico.BusinessObjects.OrderBO>)sender).Count - 1].SetDAL(objContext.Context);
         this.ObjDAL.OrdersWhereThisIsDeliveryOption.Add(obj);
         objContext.SaveChanges();
         objContext.Dispose();
     }
 }
コード例 #2
0
 void ReservationsWhereThisIsStatusList_OnAfterAdd(object sender, EventArgs e)
 {
     Indico.DAL.Reservation obj = null;
     if (this.Context != null)
     {
         if (((IndicoList <Indico.BusinessObjects.ReservationBO>)sender).Count > 0)
         {
             obj = ((IndicoList <Indico.BusinessObjects.ReservationBO>)sender)[((IndicoList <Indico.BusinessObjects.ReservationBO>)sender).Count - 1].ObjDAL;
             this.ObjDAL.ReservationsWhereThisIsStatus.Add(obj);
         }
     }
     else
     {
         IndicoContext objContext = new IndicoContext();
         obj = ((IndicoList <Indico.BusinessObjects.ReservationBO>)sender)[((IndicoList <Indico.BusinessObjects.ReservationBO>)sender).Count - 1].SetDAL(objContext.Context);
         this.ObjDAL.ReservationsWhereThisIsStatus.Add(obj);
         objContext.SaveChanges();
         objContext.Dispose();
     }
 }
コード例 #3
0
ファイル: SizeSetBO.cs プロジェクト: prakashdgl/Indico1.0
 void SizesWhereThisIsSizeSetList_OnBeforeRemove(object sender, EventArgs e)
 {
     Indico.DAL.Size obj = null;
     if (this.Context != null)
     {
         if (((IndicoList <Indico.BusinessObjects.SizeBO>)sender).Count > 0)
         {
             obj = ((IndicoList <Indico.BusinessObjects.SizeBO>)sender)[((IndicoList <Indico.BusinessObjects.SizeBO>)sender).Count - 1].ObjDAL;
             this.ObjDAL.SizesWhereThisIsSizeSet.Remove(obj);
         }
     }
     else
     {
         IndicoContext objContext = new IndicoContext();
         obj = ((IndicoList <Indico.BusinessObjects.SizeBO>)sender)[((IndicoList <Indico.BusinessObjects.SizeBO>)sender).Count - 1].SetDAL(objContext.Context);
         this.ObjDAL.SizesWhereThisIsSizeSet.Remove(obj);
         objContext.SaveChanges();
         objContext.Dispose();
     }
 }
コード例 #4
0
        /// <summary>
        /// Creates an instance of the VisualLayoutAccessoryBO class using the supplied Indico.DAL.VisualLayoutAccessory.
        /// </summary>
        /// <param name="obj">a Indico.DAL.VisualLayoutAccessory whose properties will be used to initialise the VisualLayoutAccessoryBO</param>
        internal VisualLayoutAccessoryBO(Indico.DAL.VisualLayoutAccessory obj, ref IndicoContext context)
        {
            this._doNotUpdateDALObject = true;

            this.Context = context;

            // set the properties from the Indico.DAL.VisualLayoutAccessory
            this.ID = obj.ID;

            this.Accessory = (obj.AccessoryReference.EntityKey != null && obj.AccessoryReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.AccessoryReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;
            this.AccessoryColor = (obj.AccessoryColorReference.EntityKey != null && obj.AccessoryColorReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.AccessoryColorReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;
            this.VisualLayout = (obj.VisualLayoutReference.EntityKey != null && obj.VisualLayoutReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.VisualLayoutReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;

            this._doNotUpdateDALObject = false;
        }
コード例 #5
0
        /// <summary>
        /// Creates an instance of the VisualLayoutFabricBO class using the supplied Indico.DAL.VisualLayoutFabric.
        /// </summary>
        /// <param name="obj">a Indico.DAL.VisualLayoutFabric whose properties will be used to initialise the VisualLayoutFabricBO</param>
        internal VisualLayoutFabricBO(Indico.DAL.VisualLayoutFabric obj, ref IndicoContext context)
        {
            this._doNotUpdateDALObject = true;

            this.Context = context;

            // set the properties from the Indico.DAL.VisualLayoutFabric
            this.ID = obj.ID;

            this.Fabric = (obj.FabricReference.EntityKey != null && obj.FabricReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.FabricReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;
            this.FabricCodeType = (obj.FabricCodeTypeReference.EntityKey != null && obj.FabricCodeTypeReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.FabricCodeTypeReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;
            this.VisualLayout = (obj.VisualLayoutReference.EntityKey != null && obj.VisualLayoutReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.VisualLayoutReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;

            this._doNotUpdateDALObject = false;
        }
コード例 #6
0
        /// <summary>
        /// Creates an instance of the PatternSupportAccessoryBO class using the supplied Indico.DAL.PatternSupportAccessory.
        /// </summary>
        /// <param name="obj">a Indico.DAL.PatternSupportAccessory whose properties will be used to initialise the PatternSupportAccessoryBO</param>
        internal PatternSupportAccessoryBO(Indico.DAL.PatternSupportAccessory obj, ref IndicoContext context)
        {
            this._doNotUpdateDALObject = true;

            this.Context = context;

            // set the properties from the Indico.DAL.PatternSupportAccessory
            this.ID = obj.ID;

            this.AccConstant = obj.AccConstant;
            this.Accessory   = (obj.AccessoryReference.EntityKey != null && obj.AccessoryReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.AccessoryReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;
            this.CostSheet = (obj.CostSheetReference.EntityKey != null && obj.CostSheetReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.CostSheetReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;
            this.Pattern = (obj.PatternReference.EntityKey != null && obj.PatternReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.PatternReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;

            this._doNotUpdateDALObject = false;
        }
コード例 #7
0
        /// <summary>
        /// Creates an instance of the ProductionPlanningBO class using the supplied Indico.DAL.ProductionPlanning.
        /// </summary>
        /// <param name="obj">a Indico.DAL.ProductionPlanning whose properties will be used to initialise the ProductionPlanningBO</param>
        internal ProductionPlanningBO(Indico.DAL.ProductionPlanning obj, ref IndicoContext context)
        {
            this._doNotUpdateDALObject = true;

            this.Context = context;

            // set the properties from the Indico.DAL.ProductionPlanning
            this.ID = obj.ID;

            this.OrderDetail = (obj.OrderDetailReference.EntityKey != null && obj.OrderDetailReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.OrderDetailReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;
            this.ProductionLine = (obj.ProductionLineReference.EntityKey != null && obj.ProductionLineReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.ProductionLineReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;
            this.SewingDate = obj.SewingDate;
            this.WeeklyProductionCapacity = (obj.WeeklyProductionCapacityReference.EntityKey != null && obj.WeeklyProductionCapacityReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.WeeklyProductionCapacityReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;

            this._doNotUpdateDALObject = false;
        }
コード例 #8
0
        /// <summary>
        /// Creates an instance of the SizeChartBO class using the supplied Indico.DAL.SizeChart.
        /// </summary>
        /// <param name="obj">a Indico.DAL.SizeChart whose properties will be used to initialise the SizeChartBO</param>
        internal SizeChartBO(Indico.DAL.SizeChart obj, ref IndicoContext context)
        {
            this._doNotUpdateDALObject = true;

            this.Context = context;

            // set the properties from the Indico.DAL.SizeChart
            this.ID = obj.ID;

            this.MeasurementLocation = (obj.MeasurementLocationReference.EntityKey != null && obj.MeasurementLocationReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.MeasurementLocationReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;
            this.Pattern = (obj.PatternReference.EntityKey != null && obj.PatternReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.PatternReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;
            this.Size = (obj.SizeReference.EntityKey != null && obj.SizeReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.SizeReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;
            this.Val = obj.Val;

            this._doNotUpdateDALObject = false;
        }
コード例 #9
0
        /// <summary>
        /// Creates an instance of the FactoryOrderDetialBO class using the supplied Indico.DAL.FactoryOrderDetial.
        /// </summary>
        /// <param name="obj">a Indico.DAL.FactoryOrderDetial whose properties will be used to initialise the FactoryOrderDetialBO</param>
        internal FactoryOrderDetialBO(Indico.DAL.FactoryOrderDetial obj, ref IndicoContext context)
        {
            this._doNotUpdateDALObject = true;

            this.Context = context;

            // set the properties from the Indico.DAL.FactoryOrderDetial
            this.ID = obj.ID;

            this.CompletedQty = obj.CompletedQty;
            this.OrderDetail  = (obj.OrderDetailReference.EntityKey != null && obj.OrderDetailReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.OrderDetailReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;
            this.OrderDetailStatus = (obj.OrderDetailStatusReference.EntityKey != null && obj.OrderDetailStatusReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.OrderDetailStatusReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;
            this.Size = (obj.SizeReference.EntityKey != null && obj.SizeReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.SizeReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;
            this.StartedDate = obj.StartedDate;

            this._doNotUpdateDALObject = false;
        }
コード例 #10
0
 /// <summary>
 /// Creates an instance of the ProductBO class giving the IndicoContext object.
 /// createDAL parameter decides whether to be created or not the DAL for this business object.
 /// </summary>
 public DestinationPortBO(ref IndicoContext context, bool createDAL) : base(context, createDAL)
 {
 }
コード例 #11
0
 /// <summary>
 /// Creates an instance of the ProductBO class giving the IndicoContext object.
 /// createDAL parameter decides whether to be created or not the DAL for this business object.
 /// </summary>
 public ReservationBO(ref IndicoContext context, bool createDAL) : base(context, createDAL)
 {
 }
コード例 #12
0
 /// <summary>
 /// Creates an instance of the ProductBO class giving the IndicoContext object.
 /// createDAL parameter decides whether to be created or not the DAL for this business object.
 /// </summary>
 public InvoiceOrderBO(ref IndicoContext context, bool createDAL) : base(context, createDAL)
 {
 }
コード例 #13
0
 /// <summary>
 /// Creates an instance of the ProductBO class giving the IndicoContext object.
 /// createDAL parameter decides whether to be created or not the DAL for this business object.
 /// </summary>
 public PrinterTypeBO(ref IndicoContext context, bool createDAL) : base(context, createDAL)
 {
 }
コード例 #14
0
 /// <summary>
 /// Creates an instance of the ProductBO class giving the IndicoContext object.
 /// createDAL parameter decides whether to be created or not the DAL for this business object.
 /// </summary>
 public EmailLogoBO(ref IndicoContext context, bool createDAL) : base(context, createDAL)
 {
 }
コード例 #15
0
ファイル: PackingListBO.cs プロジェクト: prakashdgl/Indico1.0
 /// <summary>
 /// Creates an instance of the ProductBO class giving the IndicoContext object.
 /// createDAL parameter decides whether to be created or not the DAL for this business object.
 /// </summary>
 public PackingListBO(ref IndicoContext context, bool createDAL) : base(context, createDAL)
 {
 }
コード例 #16
0
ファイル: MenuItemBO.cs プロジェクト: prakashdgl/Indico1.0
 /// <summary>
 /// Creates an instance of the ProductBO class giving the IndicoContext object.
 /// createDAL parameter decides whether to be created or not the DAL for this business object.
 /// </summary>
 public MenuItemBO(ref IndicoContext context, bool createDAL) : base(context, createDAL)
 {
 }
コード例 #17
0
 /// <summary>
 /// Creates an instance of the ProductBO class giving the IndicoContext object.
 /// createDAL parameter decides whether to be created or not the DAL for this business object.
 /// </summary>
 public VisualLayoutBO(ref IndicoContext context, bool createDAL) : base(context, createDAL)
 {
 }
コード例 #18
0
 public BusinessObject(IndicoContext context)
 {
     this._context = context;
 }
コード例 #19
0
ファイル: UserHistoryBO.cs プロジェクト: prakashdgl/Indico1.0
 /// <summary>
 /// Creates an instance of the ProductBO class giving the IndicoContext object.
 /// createDAL parameter decides whether to be created or not the DAL for this business object.
 /// </summary>
 public UserHistoryBO(ref IndicoContext context, bool createDAL) : base(context, createDAL)
 {
 }
コード例 #20
0
 public BusinessObject(IndicoContext context, bool createDAL)
 {
     this._context   = context;
     this._createDAL = createDAL;
 }
コード例 #21
0
 /// <summary>
 /// Creates an instance of the ProductBO class giving the IndicoContext object.
 /// createDAL parameter decides whether to be created or not the DAL for this business object.
 /// </summary>
 public ClientBO(ref IndicoContext context, bool createDAL) : base(context, createDAL)
 {
 }
コード例 #22
0
        /// <summary>
        /// Creates an instance of the DistributorPriceLevelCostBO class using the supplied Indico.DAL.DistributorPriceLevelCost.
        /// </summary>
        /// <param name="obj">a Indico.DAL.DistributorPriceLevelCost whose properties will be used to initialise the DistributorPriceLevelCostBO</param>
        internal DistributorPriceLevelCostBO(Indico.DAL.DistributorPriceLevelCost obj, ref IndicoContext context)
        {
            this._doNotUpdateDALObject = true;

            this.Context = context;

            // set the properties from the Indico.DAL.DistributorPriceLevelCost
            this.ID = obj.ID;

            this.Distributor = (obj.DistributorReference.EntityKey != null && obj.DistributorReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.DistributorReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;
            this.IndicoCost   = obj.IndicoCost;
            this.ModifiedDate = obj.ModifiedDate;
            this.Modifier     = (obj.ModifierReference.EntityKey != null && obj.ModifierReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.ModifierReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;
            this.PriceLevelCost = (obj.PriceLevelCostReference.EntityKey != null && obj.PriceLevelCostReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.PriceLevelCostReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;
            this.PriceTerm = (obj.PriceTermReference.EntityKey != null && obj.PriceTermReference.EntityKey.EntityKeyValues.Count() > 0)
                ? (int)((System.Data.EntityKeyMember)obj.PriceTermReference.EntityKey.EntityKeyValues.GetValue(0)).Value
                : 0;

            this._doNotUpdateDALObject = false;
        }
コード例 #23
0
 /// <summary>
 /// Creates an instance of the ProductBO class giving the IndicoContext object.
 /// createDAL parameter decides whether to be created or not the DAL for this business object.
 /// </summary>
 public ColourProfileBO(ref IndicoContext context, bool createDAL) : base(context, createDAL)
 {
 }
コード例 #24
0
 /// <summary>
 /// Creates an instance of the ProductBO class giving the IndicoContext object.
 /// createDAL parameter decides whether to be created or not the DAL for this business object.
 /// </summary>
 public FactoryOrderDetialBO(ref IndicoContext context, bool createDAL) : base(context, createDAL)
 {
 }
コード例 #25
0
 /// <summary>
 /// Creates an instance of the ProductBO class giving the IndicoContext object.
 /// createDAL parameter decides whether to be created or not the DAL for this business object.
 /// </summary>
 public QuoteChangeEmailListBO(ref IndicoContext context, bool createDAL) : base(context, createDAL)
 {
 }
コード例 #26
0
 /// <summary>
 /// Creates an instance of the ProductBO class giving the IndicoContext object.
 /// createDAL parameter decides whether to be created or not the DAL for this business object.
 /// </summary>
 public DistributorEmailAddressBO(ref IndicoContext context, bool createDAL) : base(context, createDAL)
 {
 }
コード例 #27
0
 /// <summary>
 /// Creates an instance of the ProductBO class giving the IndicoContext object.
 /// createDAL parameter decides whether to be created or not the DAL for this business object.
 /// </summary>
 public WeeklyProductionCapacityDetailsBO(ref IndicoContext context, bool createDAL) : base(context, createDAL)
 {
 }
コード例 #28
0
 /// <summary>
 /// Creates an instance of the ProductBO class giving the IndicoContext object.
 /// createDAL parameter decides whether to be created or not the DAL for this business object.
 /// </summary>
 public PatternSupportAccessoryBO(ref IndicoContext context, bool createDAL) : base(context, createDAL)
 {
 }
コード例 #29
0
ファイル: UserLoginBO.cs プロジェクト: prakashdgl/Indico1.0
 /// <summary>
 /// Creates an instance of the ProductBO class giving the IndicoContext object.
 /// createDAL parameter decides whether to be created or not the DAL for this business object.
 /// </summary>
 public UserLoginBO(ref IndicoContext context, bool createDAL) : base(context, createDAL)
 {
 }
コード例 #30
0
ファイル: SizeSetBO.cs プロジェクト: prakashdgl/Indico1.0
 /// <summary>
 /// Creates an instance of the ProductBO class giving the IndicoContext object.
 /// createDAL parameter decides whether to be created or not the DAL for this business object.
 /// </summary>
 public SizeSetBO(ref IndicoContext context, bool createDAL) : base(context, createDAL)
 {
 }