Exemplo n.º 1
0
        public CommonParams(HttpRequestMessage request)
        {
            if (request?.GetQueryNameValuePairs() == null)
            {
                return;
            }
            var value = request.GetQueryNameValuePairs().FirstOrDefault(x => x.Key == "TimeOutInMill").Value;

            if (value != null)
            {
                TimeoutInMill = NullSafe.NullSafeInteger(value, TimeoutInMill);
            }

            //THIS IS ALSO USED BY ZILLOW 'single user request'
            value = request.GetQueryNameValuePairs().FirstOrDefault(x => x.Key == "UseOnlyThisUserId").Value;
            if (value != null)
            {
                UseOnlyThisUserId = NullSafe.NullSafeInteger(value, UseOnlyThisUserId);
            }

            value = request.GetQueryNameValuePairs().FirstOrDefault(x => x.Key == "DebugModeType").Value;
            if (value != null)
            {
                EnumLib.TryParse(value, out DebugModeType);
            }
        }
Exemplo n.º 2
0
        protected void Application_Start()
        {
            new DataConnections();

            var formatters    = GlobalConfiguration.Configuration.Formatters;
            var jsonFormatter = formatters.JsonFormatter;

            jsonFormatter.SerializerSettings = JsonSettings;

            LeadWebServices = new ApiWebServices(DataContextType.Database, DataConnections.DataContextLoanTekRead).Get(new Filter
            {
                PropertySearchItems = new List <SearchAndCompare.ColumnSearchItem>
                {
                    new SearchAndCompare.ColumnSearchItem
                    {
                        Column      = "CategoryType",
                        CompareType = Types.SearchAndCompare.CompareType.EqualTo,
                        SearchTerm  = Types.Api.ApiCategoryTypes.CRM.ToString()
                    }
                }
            });


            GlobalConfiguration.Configure(WebApiConfig.Register);
            GlobalConfiguration.Configuration.Filters.Add(new CustomExceptionFilterAttribute());

            ApiObject = new LeadsClientsApi()
            {
                Versions = new List <Version>()
                {
                    new Version()
                    {
                        MajorVersionId = 1,
                        MinorVersionId = 1,
                        VersionStatus  = Types.Api.VersionStatusType.Beta,
                        Created        = Convert.ToDateTime("04/01/2016"),
                        LastUpdated    = Convert.ToDateTime("07/08/2016")
                    }
                }
            };

            var clientId = 399;

            Debug.WriteLine("ClientId:" + clientId + " LeadsController Auth key:" + AuthToken.EncryptAuthKey(clientId, NewLeadsController.ApiObject.ApiName));
            Debug.WriteLine("ClientId:" + clientId + " WidgetController Auth key:" + AuthToken.EncryptAuthKey(clientId, WidgetController.WebServiceName));

            string key = ConfigurationManager.AppSettings.AllKeys.FirstOrDefault(x => x.ToLower().Equals("useonlythisuserid"));

            Global.UseOnlyThisUserId = NullSafe.NullSafeInteger(ConfigurationManager.AppSettings[key], 0);

            key = ConfigurationManager.AppSettings.AllKeys.FirstOrDefault(x => x.ToLower().Equals("Types.Api.ServerStatusType"));
            Global.ServerStatusType = EnumLib.TryParse <Types.Api.ApiStatusType>((key != null) ? ConfigurationManager.AppSettings[key] : ((Debugger.IsAttached) ? Types.Api.ApiStatusType.Testing : Types.Api.ApiStatusType.Live).ToString());

            if (!Debugger.IsAttached)
            {
                this.initCommonData();
            }
        }
Exemplo n.º 3
0
        private void FormIxtisaslar_Load(object sender, EventArgs e)
        {
            if (Kafedra == null)
            {
                this.Close();
            }
            this.Text       = this.Kafedra.Ad + " Kafedrası İxtisasları";
            secilmisIxtisas = null;
            buttonIxtisasDersleri.Enabled = false;
            buttonIxtisasQruplari.Enabled = false;
            buttonSaxla.Enabled           = false;
            buttonSil.Enabled             = false;

            turler = EnumLib.GetEnumList <IxtisasTuru>();
            comboBoxTur.DataSource    = turler;
            comboBoxTur.DisplayMember = "Name";
            comboBoxTur.ValueMember   = "Value";

            ixtisaslariGetir();
        }
Exemplo n.º 4
0
 public UserControlMuelliminBildiyiDil()
 {
     InitializeComponent();
     seviyyeler = EnumLib.GetEnumList <DilBilgisiSeviyyesi>();
 }