Exemple #1
0
 /// <summary>
 /// Sets the forms toolbar buttons visibility based on the display mode of the product.
 /// </summary>
 /// <param name="form">The product details form.</param>
 /// <param name="args">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 public static void OnFormLoad(IProductDetails form, EventArgs args)
 {
     Sage.Platform.WebPortal.SmartParts.EntityBoundSmartPart smartpart = form.NativeForm as Sage.Platform.WebPortal.SmartParts.EntityBoundSmartPart;
     Sage.Platform.WebPortal.EntityPage page = (Sage.Platform.WebPortal.EntityPage)smartpart.Page;
     if (page != null)
     {
         Sage.Platform.SData.IAppIdMappingService mappingService = Sage.Platform.Application.ApplicationContext.Current.Services.Get <Sage.Platform.SData.IAppIdMappingService>(true);
         if (mappingService.IsIntegrationEnabled())
         {
             form.clIntegrationContract.Visible = true;
             form.curCost.Enabled = false;
             //form.txtDescription.Enabled = false;
             form.txtName.Enabled          = false;
             form.txtSKU.Enabled           = false;
             form.pklFamily.Enabled        = false;
             form.pklStatus.Enabled        = false;
             form.pklType.Enabled          = false;
             form.lueUnitOfMeasure.Enabled = false;
             form.btnDelete.Visible        = false;
             form.btnSave.Visible          = false;
             form.btnInsertSave.Visible    = false;
         }
         else
         {
             form.clIntegrationContract.Visible = false;
             bool bInsertMode = page.ModeId.ToUpper().Equals("INSERT");
             form.btnDelete.Visible     = !bInsertMode;
             form.btnSave.Visible       = !bInsertMode;
             form.btnInsertSave.Visible = bInsertMode;
         }
     }
 }
 /// <summary>
 /// Sets the forms toolbar buttons visibility based on the display mode of the product.
 /// </summary>
 /// <param name="form">The product details form.</param>
 /// <param name="args">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 public static void OnFormLoad(IProductDetails form, EventArgs args)
 {
     Sage.Platform.WebPortal.SmartParts.EntityBoundSmartPart smartpart = form.NativeForm as Sage.Platform.WebPortal.SmartParts.EntityBoundSmartPart;
     Sage.Platform.WebPortal.EntityPage page = (Sage.Platform.WebPortal.EntityPage)smartpart.Page;
     if (page != null)
     {
         Sage.Platform.SData.IAppIdMappingService mappingService = Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.SData.IAppIdMappingService>(true);
         if (mappingService.IsIntegrationEnabled())
         {
             form.clIntegrationContract.Visible = true;
             form.curCost.Enabled = false;
             form.txtDescription.Enabled = false;
             form.txtName.Enabled = false;
             form.txtSKU.Enabled = false;
             form.pklFamily.Enabled = false;
             form.pklStatus.Enabled = false;
             form.pklType.Enabled = false;
             form.lueUnitOfMeasure.Enabled = false;
             form.btnDelete.Visible = false;
             form.btnSave.Visible = false;
             form.btnInsertSave.Visible = false;
         }
         else
         {
             form.clIntegrationContract.Visible = false;
             bool bInsertMode = page.ModeId.ToUpper().Equals("INSERT");
             form.btnDelete.Visible = !bInsertMode;
             form.btnSave.Visible = !bInsertMode;
             form.btnInsertSave.Visible = bInsertMode;
         }
     }
 }
 public UnitOfWork(DbContext context)
 {
     this.Context           = context;
     user                   = new UsersRepo(Context);
     products               = new ProductsRepo(Context);
     productdetails         = new ProductDetailsRepo(Context);
     productsproductdetails = new ProductProductDetailsRepo(Context);
 }
        /// <summary>
        /// Sets the forms toolbar buttons visibility based on the display mode of the product.
        /// </summary>
        /// <param name="form">The product details form.</param>
        /// <param name="args">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        public static void OnFormLoad(IProductDetails form, EventArgs args)
        {
            Sage.Platform.WebPortal.SmartParts.EntityBoundSmartPart smartpart = form.NativeForm as Sage.Platform.WebPortal.SmartParts.EntityBoundSmartPart;
            Sage.Platform.WebPortal.EntityPage page = (Sage.Platform.WebPortal.EntityPage)smartpart.Page;
            if (page != null)
            {
                bool bInsertMode = page.ModeId.ToUpper().Equals("INSERT");
                form.btnDelete.Visible = !bInsertMode;
                form.btnSave.Visible = !bInsertMode;
                form.btnInsertSave.Visible = bInsertMode;

            }
        }
Exemple #5
0
 public ProductManager(IProductDetails iProductDetails)
 {
     this._IProductDetails = iProductDetails;
 }
Exemple #6
0
 public HomeController(IProducts iProduct, ICategory icategory, IProductDetails iProductDetails)
 {
     _iProduct        = iProduct;
     _icategory       = icategory;
     _iProductDetails = iProductDetails;
 }
 public ProductController(IProductDetails pr)
 {
     productRepository = pr;
 }