예제 #1
0
        public static void SetupIntegrationContractStep(IInsertOpportunity form, EventArgs args)
        {
            IOpportunity opportunity = form.CurrentEntity as IOpportunity;

            if (opportunity == null)
            {
                return;
            }
            Sage.Platform.SData.IAppIdMappingService oMappingService = Sage.Platform.Application.ApplicationContext.Current.Services.Get <Sage.Platform.SData.IAppIdMappingService>(false);
            if (oMappingService != null && oMappingService.IsIntegrationEnabled())
            {
                if (!opportunity.CanChangeOperatingCompany())
                {
                    form.lueERPApplication.Enabled = false;
                    form.luePriceList.Enabled      = false;
                }
                else
                {
                    form.lueERPApplication.Enabled = true;
                    form.luePriceList.Enabled      = (form.lueERPApplication.LookupResultValue != null);
                }
            }
            else
            {
                form.clIntegrationContract.Visible = false;
            }
        }
 public static void SetupIntegrationContractStep( IInsertOpportunity form,  EventArgs args)
 {
     IOpportunity opportunity = form.CurrentEntity as IOpportunity;
     if (opportunity == null)
     {
         return;
     }
     Sage.Platform.SData.IAppIdMappingService oMappingService = Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.SData.IAppIdMappingService>(false);
     if (oMappingService != null && oMappingService.IsIntegrationEnabled())
     {
         if (!opportunity.CanChangeOperatingCompany())
         {
             form.lueERPApplication.Enabled = false;
             form.luePriceList.Enabled = false;
         }
         else
         {
             form.lueERPApplication.Enabled = true;
             form.luePriceList.Enabled = (form.lueERPApplication.LookupResultValue != null);
         }
     }
     else
     {
         form.clIntegrationContract.Visible = false;
     }
 }
 // SSI JKL 10/03/2011
 // Fix Praxi issue of Arrival Day and Departure Day are not being computed...
 public static void dtpArrivalDate_OnChangeStep(IInsertOpportunity form,  EventArgs args)
 {
     DateTime dtArrivalDate;
     Sage.Entity.Interfaces.IOpportunity objOpportunity = form.CurrentEntity as Sage.Entity.Interfaces.IOpportunity;
     if (objOpportunity.OpportunityCIUDF.Main_arrival_Date != null) {
         dtArrivalDate = Convert.ToDateTime(objOpportunity.OpportunityCIUDF.Main_arrival_Date);
         objOpportunity.OpportunityCIUDF.Main_arrival_day = dtArrivalDate.DayOfWeek.ToString();
     }
 }
예제 #4
0
        public static void SetupIntegrationContractStep(IInsertOpportunity form, EventArgs args)
        {
            IOpportunity opportunity = form.CurrentEntity as IOpportunity;

            if (opportunity == null)
            {
                return;
            }
            Sage.Platform.SData.IAppIdMappingService oMappingService = Sage.Platform.Application.ApplicationContext.Current.Services.Get <Sage.Platform.SData.IAppIdMappingService>(false);
            if (oMappingService != null && oMappingService.IsIntegrationEnabled())
            {
                if (!opportunity.CanChangeOperatingCompany())
                {
                    form.lueERPApplication.Enabled = false;
                    form.luePriceList.Enabled      = false;
                }
                else
                {
                    form.lueERPApplication.Enabled = true;
                    object oValue = form.lueERPApplication.LookupResultValue;
                    string sValue = string.Empty;
                    if (oValue != null)
                    {
                        sValue = oValue.ToString();
                    }
                    if (string.IsNullOrEmpty(sValue))
                    {
                        form.luePriceList.Text = string.Empty;
                        form.luePriceList.LookupResultValue = null;
                        form.luePriceList.Enabled           = false;
                    }
                    else
                    {
                        form.luePriceList.Enabled = true;
                    }
                    SalesLogix.HighLevelTypes.LookupPreFilter filterAppId = new SalesLogix.HighLevelTypes.LookupPreFilter();
                    filterAppId.LookupEntityName = "Sage.Entity.Interfaces.IAppIdMapping";
                    filterAppId.PropertyName     = "Id";
                    filterAppId.OperatorCode     = "!=";
                    filterAppId.FilterValue      = oMappingService.LocalAppId;
                    filterAppId.PropertyType     = "System.String";
                    form.lueERPApplication.LookupPreFilters.Add(filterAppId);
                }
            }
            else
            {
                form.clIntegrationContract.Visible = false;
            }
        }
 public static void SetupIntegrationContractStep( IInsertOpportunity form,  EventArgs args)
 {
     IOpportunity opportunity = form.CurrentEntity as IOpportunity;
     if (opportunity == null)
     {
         return;
     }
     Sage.Platform.SData.IAppIdMappingService oMappingService = Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.SData.IAppIdMappingService>(false);
     if (oMappingService != null && oMappingService.IsIntegrationEnabled())
     {
         if (!opportunity.CanChangeOperatingCompany())
         {
             form.lueERPApplication.Enabled = false;
             form.luePriceList.Enabled = false;
         }
         else
         {
             form.lueERPApplication.Enabled = true;
             object oValue = form.lueERPApplication.LookupResultValue;
             string sValue = string.Empty;
             if (oValue != null)
             {
                 sValue = oValue.ToString();
             }
             if (string.IsNullOrEmpty(sValue))
             {
                 form.luePriceList.Text = string.Empty;
                 form.luePriceList.LookupResultValue = null;
                 form.luePriceList.Enabled = false;
             }
             else
             {
                 form.luePriceList.Enabled = true;
             }
             SalesLogix.HighLevelTypes.LookupPreFilter filterAppId = new SalesLogix.HighLevelTypes.LookupPreFilter();
             filterAppId.LookupEntityName = "Sage.Entity.Interfaces.IAppIdMapping";
             filterAppId.PropertyName = "Id";
             filterAppId.OperatorCode = "!=";
             filterAppId.FilterValue = oMappingService.LocalAppId;
             filterAppId.PropertyType = "System.String";
             form.lueERPApplication.LookupPreFilters.Add(filterAppId);
         }
     }
     else
     {
         form.clIntegrationContract.Visible = false;
     }
 }