Esempio n. 1
0
        protected void BuildReport(string file = null, Type reportType = null, bool checkEmptyData = false)
        {
            if (reportType != null && report == null)
            {
                report = (BaseReport)Activator.CreateInstance(reportType, Conn, properties);
            }
            report.ReportCaption = report.ReportCaption ?? "test report";

            if (file == null)
            {
                file = "test.xls";
            }
            _fileName = file;
            if (File.Exists(file))
            {
                File.Delete(file);
            }
            ProfileHelper.Start();
            report.CheckEmptyData = checkEmptyData;
            ArHelper.WithSession(s => {
                report.Session = s;
                report.Write(Path.GetFullPath(file));
            });
            ProfileHelper.Stop();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            ProfileHelper = new ProfileHelper(Request["user"]);

            Title = HeaderStringHelper.GetPageTitle(ProfileHelper.UserInfo.DisplayUserName(true));

            var control = (UserProfileControl)LoadControl(UserProfileControl.Location);

            control.UserProfileHelper = ProfileHelper;

            CommonContainerHolder.Controls.Add(control);

            var actions = (UserProfileActions)LoadControl(UserProfileActions.Location);

            actions.ProfileHelper = ProfileHelper;
            actionsHolder.Controls.Add(actions);

            if (ProfileHelper.UserInfo.IsMe())
            {
                InitSubscriptionView();
                InitTipsSettingsView();

                var script = new StringBuilder();
                script.Append("jq('#switcherSubscriptionButton').one('click',");
                script.Append("function() {");
                script.Append("if (!jq('#subscriptionBlockContainer').hasClass('subsLoaded') &&");
                script.Append("typeof (window.CommonSubscriptionManager) != 'undefined' &&");
                script.Append("typeof (window.CommonSubscriptionManager.LoadSubscriptions) === 'function') {");
                script.Append("window.CommonSubscriptionManager.LoadSubscriptions();");
                script.Append("jq('#subscriptionBlockContainer').addClass('subsLoaded');");
                script.Append("}});");

                Page.RegisterInlineScript(script.ToString());
            }
        }
Esempio n. 3
0
        public void InitTestUser()
        {
            var facade = new ProfileApiFacade(
                Logger,
                Configuration.RootUrl);

            var testUser = new TestUserModel
            {
                Email    = Configuration.UserName,
                Password = Configuration.Password,
            };

            var response = facade.PostCreateNewProfile(testUser);

            if (response.StatusCode == HttpStatusCode.Conflict)
            {
                return;
            }
            if (response.StatusCode == HttpStatusCode.Created)
            {
                Assert.IsEmpty(ProfileHelper.CompareUserProfiles(testUser, response.Map <TestUserModel>()));
                return;
            }

            Assert.Fail("Test user was not created");
        }
Esempio n. 4
0
        /// <summary>
        /// If weapon & lich king or higher, return true
        /// </summary>
        /// <returns></returns>
        private bool NeedsWeaponExportWindow()
        {
            var expansion = ProfileHelper.GetProfileGameVersion();

            return(_item.Class.Id == 2 && !Properties.Settings.Default.disableWeaponCreationNotice &&
                   (expansion == ProfileHelper.Expansion.Unknown || expansion >= ProfileHelper.Expansion.WrathOfTheLichKing));
        }
Esempio n. 5
0
        public async Task <IActionResult> Index()
        {
            var engineHelper  = new EngineHelper();
            var profileHelper = new ProfileHelper();
            var stopWatch     = new Stopwatch();

            stopWatch.Start();
            var feedUrls = new List <string>
            {
                @"https://universe-meeps.leagueoflegends.com/v1/en_us/champion-browse/index.json"
            };
            string jsonPath         = @"$.champions[*].slug";
            string interpolationUrl = @"https://universe-meeps.leagueoflegends.com/v1/en_us/champions/{0}/index.json";
            var    itemUrls         = await engineHelper.GetItemUrlsAjax(feedUrls, jsonPath, interpolationUrl);

            var profiles = new List <Profile>();

            foreach (var itemUrl in itemUrls)
            {
                var profile = await profileHelper.CreateProfileAjax(itemUrl,
                                                                    "$.champion.name",
                                                                    "$.champion.title",
                                                                    "$.champion.biography.short",
                                                                    null, null, null, null, null);

                profiles.Add(profile);
            }
            stopWatch.Stop();
            var elapsed = stopWatch.Elapsed.TotalSeconds;

            return(View());
        }
Esempio n. 6
0
    /// <summary>
    /// Build the search request, submit the search and process the result.
    /// This is the handler for the Keyword searches
    /// </summary>
    private void ProcessKeywordSearch()
    {
        Session["ProfileSearchRequestCriteriaList"] = new List <string>();
        Session["ProfileSearchRequestKeywordList"]  = new List <string>();

        Profiles profiles = ProfileHelper.GetNewProfilesDefinition();


        string keywordString = this.HTMLEncode(Convert.ToString(Request.QueryString["Word"].ToString().Trim()));

        // Keywords
        if (keywordString.Length > 0)
        {
            profiles.QueryDefinition.Keywords.KeywordString.Text = keywordString;
            //if there is a space char in the string, then its a group of words coming from the Most Viewed..
            if (keywordString.Trim().Contains(" "))
            {
                profiles.QueryDefinition.Keywords.KeywordString.MatchType = KeywordMatchType.exact;
            }
            // Add the searched keyword to the right side of the page
            ((List <string>)Session["ProfileSearchRequestKeywordList"]).Add(keywordString);
        }

        profiles.Version = 2;

        // Save the search request into a session object so that the
        // object data source can use it during the Select event
        Session["ProfileSearchRequest"] = profiles;

        Session["MeshSearch"]   = 0;
        Session["WasSearchRun"] = "Y";

        // Get results bound to grid
        BindSearchResults(0);
    }
Esempio n. 7
0
        public List <String> GetFhirTypes(string elementPath)
        {
            // TODO: Extract the resourceType from elementPath
            string        resourceType = elementPath.Substring(0, elementPath.IndexOf('.'));
            var           strucDef     = ProfileHelper.GetProfile(resourceType);
            List <String> fhirTypes    = new List <String>();

            // TODO: element type is not a reference, return empty array

            foreach (var element in strucDef.Snapshot.Element)
            {
                if (element.Path != elementPath)
                {
                    continue;
                }

                foreach (var type in element.Type)
                {
                    if (type.Code != "Reference")
                    {
                        throw new NotSupportedException("Not a reference");
                    }
                    else
                    {
                        String profile        = type.TargetProfile;
                        String primaryContext = profile.Substring(profile.LastIndexOf("/") + 1);
                        fhirTypes.Add(primaryContext);
                    }
                }
            }

            return(fhirTypes);
        }
Esempio n. 8
0
        public static void ProcessCheck()
        {
            if (IsInTransition)
            {
                return;
            }

            if (CombatIsDone)
            {
                ChangeLootState(true);
            }

            if (LootIsDone)
            {
                ChangeLootState(false);
                ProfileHelper.LoadProfile("Loader");
            }

            if (!IsInUberWorld)
            {
                return;
            }

            OrganCheck();
            LegendaryCheck();
        }
Esempio n. 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!CoreContext.Configuration.YourDocs)
            {
                InitScripts();
            }
            Page.RegisterBodyScripts(ResolveUrl("~/js/uploader/ajaxupload.js"));

            Master.DisabledSidePanel = true;

            helper = new ProfileHelper(Request["user"]);

            UserInfo = helper.userProfile;

            if (Request.Params["action"] == "edit")
            {
                InitEditControl();
                EditProfileFlag = true;
            }
            else
            {
                InitProfileControl();
                EditProfileFlag = false;
            }

            Title = HeaderStringHelper.GetPageTitle(Resource.MyProfile);
        }
Esempio n. 10
0
        /// <summary>
        /// If weapon & lich king or higher, return true
        /// </summary>
        /// <returns></returns>
        private bool NeedsWeaponExportWindow()
        {
            var expansion = ProfileHelper.GetProfileGameVersion();

            return(_item.Class.Id == 2 &&
                   (expansion == ProfileHelper.Expansion.Unknown || expansion >= ProfileHelper.Expansion.WrathOfTheLichKing));
        }
Esempio n. 11
0
        private void tsbDelete_Click(object sender, EventArgs e)
        {
            if (TabProfiles.SelectedIndex == 0)
            {
                try{
                    if (lstProfiles.SelectedValue != null)
                    {
                        ProfileHelper profileHelper = new ProfileHelper();
                        Profile       profile       = new Profile
                        {
                            IdProfile = Int32.Parse(lstProfiles.SelectedValue.ToString())
                        };
                        DialogResult r = MessageBox.Show(this, String.Format(TranslateUtil.GetMsgConfirmDelete(), ((Profile)lstProfiles.SelectedItem).ProfileName), this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                        if (r == DialogResult.Yes)
                        {
                            profileHelper.Delete(profile);
                            profileSelected = null;
                            LoadProfiles();
                        }
                    }
                    else
                    {
                        MessageBox.Show(this, TranslateUtil.GetMsgSelectProfile(), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }catch {}
            }
        }
        public override void OnActionExecuting(ActionExecutingContext context)
        {
            // do something before the action executes
            base.OnActionExecuting(context);

            var controller = (CustomControllerBase)context.Controller;

            var result = controller.PreActionFilterHook(CausesValidation, ListensToEvent, ActionName);

            if (result != null)
            {
                context.Result = result;
            }

            var response = context.HttpContext.Response;
            var manager  = ServiceLocator.Current.GetInstance <IMiniSessionService>();

            manager.OpenSession();

            response.Headers.Add("zappuser", new string[] { IdentityHelper.GetCurrentUserName() });

            var culture = ProfileHelper.GetCurrentLocale();
            var id      = culture.Id;
            var code    = culture.Code;

            if (id == null)
            {
                return;
            }
            Thread.CurrentThread.CurrentCulture   = new CultureInfo(id.Value);
            Thread.CurrentThread.CurrentUICulture = new CultureInfo(id.Value);

            response.Headers.Add("Culture", new string[] { code });
        }
Esempio n. 13
0
        public virtual void Write(string fileName)
        {
            ReadReportParams();
            ProcessReport();
            var reportTable = GetReportTable();

            if (IsEmpty(reportTable))
            {
                throw new Exception(@"В результате подготовки отчета получился пустой набор данных
1. если это отчет по заказам, то возможно за выбранный период нет заказов или же данные за выбранный период не были импортированы (нужно проверить таблицу ordersold)
2. если это отчет по динамике цен, то возможно не были подготовлены данные, нужно проверить, заполнены ли соответствующие таблицы данными
3. если это отчет по предложениям, то нужно проверить настройки отчета возможно в них ошибка. Так, например:
а) для отчета, формируемом по базовым ценам, нужно убедиться, что ценовая колонка, настроенная в системе, как базовая присутствует в прайс-листе поставщика");
            }

            var writer = GetWriter(Format);

            if (writer != null)
            {
                // Новый механизм, выносим часть для выгрузки в файл в отдельный класс
                var settings = GetSettings();
                writer.WriteReportToFile(_dsReport, fileName, settings);
                Warnings.AddRange(writer.Warnings);
                return;
            }

            if (Format == ReportFormats.DBF)
            {
                if (!DbfSupported)
                {
                    throw new ReportException("Подотчет не может готовиться в формате DBF.");
                }
                // Формируем DBF
                fileName = Path.Combine(Path.GetDirectoryName(fileName), ReportCaption + ".dbf");
                ProfileHelper.Next("DataTableToDbf");
                DataTableToDbf(reportTable, fileName);
            }
            else if (Format == ReportFormats.CSV)
            {
                if (!DbfSupported)
                {
                    throw new ReportException("Подотчет не может готовиться в формате CSV.");
                }
                //Формируем CSV
                ProfileHelper.Next("CsvHelper.Save");
                fileName = Path.Combine(Path.GetDirectoryName(fileName), ReportCaption + ".csv");
                CsvHelper.Save(reportTable, fileName);
            }
            else
            {
                // Формируем Excel
                ProfileHelper.Next("DataTableToExcel");
                DataTableToExcel(reportTable, fileName);
                if (File.Exists(fileName))
                {
                    ProfileHelper.Next("FormatExcel");
                    FormatExcel(fileName);
                }
            }
        }
        public IHttpActionResult UpdateProfile([FromBody] string clientProfile)
        {
            if (string.IsNullOrEmpty(this.User.Identity.Name))
            {
                return(this.Ok());
            }

            dynamic obj        = JsonConvert.DeserializeObject(clientProfile);
            var     clientUser = ProfileHelper.GetClientUser(this.User.Identity.Name);

            clientUser.UserFilter = FilterFromPost(obj.company);
            clientUser.CompetitorFilter.Clear();
            foreach (var item in obj.competitors)
            {
                if (item.name == "" || item.filters.Count == 0)
                {
                    continue;
                }
                var filter = FilterFromPost(item);
                clientUser.CompetitorFilter.Add(filter);
            }
            clientUser.UserFilter.UserName = this.User.Identity.Name;//公司名称不能被修改


            if (this.IsValidFilter(clientUser) || IsValidCompetitorFilter(clientUser))
            {
                ProfileHelper.UpdateClientUser(clientUser);
                clientUser = ProfileHelper.GetClientUser(this.User.Identity.Name);
                BackgroundJob.Enqueue(() => TaskProcessor.InitDataFast(clientUser));
            }

            return(this.Ok(clientUser));
        }
Esempio n. 15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.RegisterBodyScripts("~/js/uploader/ajaxupload.js")
            .RegisterBodyScripts("~/js/asc/core/my.js");

            Master.DisabledSidePanel = true;

            _helper   = new ProfileHelper(Request["user"]);
            UserName  = _helper.UserInfo.DisplayUserName(true);
            UserEmail = _helper.UserInfo.Email;

            if (Request.Params["action"] == "edit")
            {
                InitEditControl();
                EditProfileFlag = true;
            }
            else
            {
                InitProfileControl();
                InitTipsSettingsView();
                EditProfileFlag = false;
            }

            Title = HeaderStringHelper.GetPageTitle(Resource.MyProfile);
        }
Esempio n. 16
0
        public void Start()
        {
            //не удаляем файл после завершения теста что бы можно было посмотреть на него глазами
            if (!String.IsNullOrEmpty(_fileName) && File.Exists(_fileName))
            {
                File.Delete(_fileName);
            }
            File.Delete("test.xls");
            report    = null;
            _fileName = null;
            i         = 1;
            ProfileHelper.Start();
            properties = new DataSet();
            var table = properties.Tables.Add("ReportProperties");

            table.Columns.Add("PropertyName");
            table.Columns.Add("PropertyValue", typeof(object));
            table.Columns.Add("PropertyType");
            table.Columns.Add("ID");
            var values = properties.Tables.Add("ReportPropertyValues");

            values.Columns.Add("ReportPropertyID");
            values.Columns.Add("Value");

            Conn = (MySqlConnection)session.Connection;
        }
Esempio n. 17
0
    private void initControl()
    {
        if (_profileId != 0)
        {
            Profiles pr = ProfileHelper.GetNewProfilesDefinition();
            pr = ProfileHelper.AddPassiveNetworkOption(pr, true);

            pr.QueryDefinition.PersonID = _profileId.ToString();

            ProfileServiceAdapter pa = new ProfileServiceAdapter();

            bool isSecure = System.Convert.ToBoolean(ConfigUtil.GetConfigItem("IsSecure"));
            pr.Version = 2;
            PersonList pl = pa.ProfileSearch(pr, isSecure);

            if (pl.Person[0].PassiveNetworks != null)
            {
                if (pl.Person[0].PassiveNetworks.KeywordList != null)
                {
                    if (pl.Person[0].PassiveNetworks.KeywordList.Keyword.Count > 0)
                    {
                        rptKeywordList.DataSource = pl.Person[0].PassiveNetworks.KeywordList.Keyword;
                        lblKeywordHeader.Visible  = true;
                        rptKeywordList.DataBind();
                    }
                }

                if (pl.Person[0].PassiveNetworks.SimilarPersonList != null)
                {
                    if (pl.Person[0].PassiveNetworks.SimilarPersonList.SimilarPerson.Count > 0)
                    {
                        dlSimiliarPeople.DataSource    = pl.Person[0].PassiveNetworks.SimilarPersonList.SimilarPerson;
                        lblSimilarPeopleHeader.Visible = true;
                        dlSimiliarPeople.DataBind();
                    }
                }

                if (pl.Person[0].PassiveNetworks.CoAuthorList != null)
                {
                    if (pl.Person[0].PassiveNetworks.CoAuthorList.CoAuthor.Count > 0)
                    {
                        dlCoAuthor.DataSource     = pl.Person[0].PassiveNetworks.CoAuthorList.CoAuthor;
                        lblCoAuthorHeader.Visible = true;
                        dlCoAuthor.DataBind();
                    }
                }

                if (pl.Person[0].PassiveNetworks.NeighborList != null)
                {
                    if (pl.Person[0].PassiveNetworks.NeighborList.Neighbor.Count > 0)
                    {
                        dlNeighbor.DataSource     = pl.Person[0].PassiveNetworks.NeighborList.Neighbor;
                        lblNeighborHeader.Visible = true;
                        dlNeighbor.DataBind();
                    }
                }
            }
        }
    }
Esempio n. 18
0
 public ActionResult Index()
 {
     if (!ProfileHelper.UserHasProfile(ProfileHelper.GetIdentity))
     {
         return(RedirectToAction("CreateProfile"));
     }
     return(PartialView(ProfileHelper.GetPlayerProfile(ProfileHelper.GetIdentity)));
 }
 public StructureDefinitionImporter(IObjectRepository tdb, string scheme, string authority)
 {
     this.tdb       = tdb;
     this.scheme    = scheme;
     this.authority = authority;
     this.implementationGuideType = STU3Helper.GetImplementationGuideType(this.tdb, true);
     this.profileBundle           = ProfileHelper.GetProfileBundle();
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="AnalysisController"/> class.
        /// </summary>
        public AnalysisController()
        {
            var userName = this.User.Identity.Name;
            var profile  = ProfileHelper.GetClientUser(userName);

            this.config     = new SysConfig();
            this.clientUser = profile;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ScanController"/> class.
        /// </summary>
        public ScanController()
        {
            var userName = this.User.Identity.Name;

            this.clientUser    = ProfileHelper.GetClientUser(userName);
            this.weiboManager  = new WeiboManager(new SysConfig(), this.clientUser);
            this.reportManager = new ScanReportManager(this.clientUser);
        }
Esempio n. 22
0
 public virtual ActionResult UpdateProfileElementPosition(long?profileElementId, long?profileHeaderId, int orderNumber)
 {
     if (profileHeaderId != null || profileElementId != null)
     {
         ProfileHelper.UpdateProfileElementsPositions(profileElementId, profileHeaderId, orderNumber);
     }
     return(null);
 }
Esempio n. 23
0
        public static string GetCurrentLanguage()
        {
            var cultureInfo = new CultureInfo((int)ProfileHelper.GetCurrentProfileLanguageLCID());

            return(string.IsNullOrWhiteSpace(cultureInfo?.Name)
                   ? _defaultLang
                   : cultureInfo.Name.ToLowerInvariant());
        }
Esempio n. 24
0
 public ActionResult MyMatches()
 {
     if (!ProfileHelper.UserHasProfile(ProfileHelper.GetIdentity))
     {
         return(RedirectToAction("CreateProfile", "Player"));
     }
     return(PartialView(GameHelper.GetMyMatches(ProfileHelper.GetIdentity)));
 }
Esempio n. 25
0
        public ActionResult Register(string username, string email, string password, string confirmPassword)
        {
            ViewData["Title"]          = "Register";
            ViewData["PasswordLength"] = Provider.MinRequiredPasswordLength;

            // Non-POST requests should just display the Register form
            if (Request.HttpMethod != "POST")
            {
                return(View());
            }

            // Basic parameter validation
            List <string> errors = new List <string>();

            if (String.IsNullOrEmpty(username))
            {
                errors.Add("You must specify a username.");
            }
            if (String.IsNullOrEmpty(email))
            {
                errors.Add("You must specify an email address.");
            }
            if (password == null || password.Length < Provider.MinRequiredPasswordLength)
            {
                errors.Add(String.Format(CultureInfo.InvariantCulture,
                                         "You must specify a password of {0} or more characters.",
                                         Provider.MinRequiredPasswordLength));
            }
            if (!String.Equals(password, confirmPassword, StringComparison.Ordinal))
            {
                errors.Add("The password and confirmation do not match.");
            }

            if (errors.Count == 0)
            {
                // Attempt to register the user
                MembershipCreateStatus createStatus;
                MembershipUser         newUser = Provider.CreateUser(username, password, email, null, null, true, null, out createStatus);

                if (newUser != null)
                {
                    ProfileHelper.Create(DB, username);
                    DB.Dispose();
                    FormsAuth.SetAuthCookie(username, false /* createPersistentCookie */);
                    return(RedirectToAction("Index", "Home"));
                }
                else
                {
                    errors.Add(ErrorCodeToString(createStatus));
                }
            }

            // If we got this far, something failed, redisplay form
            ViewData["errors"]   = errors;
            ViewData["username"] = username;
            ViewData["email"]    = email;
            return(View());
        }
Esempio n. 26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            IsPageEditProfileFlag = (Request["action"] == "edit");

            ProfileHelper = new ProfileHelper(Request["user"]);
            UserInfo      = ProfileHelper.UserInfo;

            if ((IsPageEditProfileFlag && !(UserInfo.IsMe() || CanEdit())) || (!IsPageEditProfileFlag && !IsAdmin()))
            {
                Response.Redirect("~/products/people/", true);
            }

            Page.RegisterBodyScripts("~/usercontrols/users/userprofile/js/userprofileeditcontrol.js");
            Page.RegisterStyle("~/usercontrols/users/userprofile/css/profileeditcontrol_style.less");

            CanAddUser = TenantStatisticsProvider.GetUsersCount() < TenantExtra.GetTenantQuota().ActiveUsers;

            CanEditType = SecurityContext.CheckPermissions(Constants.Action_AddRemoveUser) &&
                          (!(UserInfo.IsAdmin() || IsModuleAdmin()) || !IsPageEditProfileFlag);

            if (IsPageEditProfileFlag)
            {
                Phone         = UserInfo.MobilePhone.HtmlEncode();
                ProfileGender = UserInfo.Sex.HasValue ? UserInfo.Sex.Value ? "1" : "0" : "-1";
                Departments   = CoreContext.UserManager.GetUserGroups(UserInfo.ID);
                SocContacts   = ProfileHelper.Contacts;
                OtherContacts = new List <MyContact>();
                OtherContacts.AddRange(ProfileHelper.Emails);
                OtherContacts.AddRange(ProfileHelper.Messengers);
                OtherContacts.AddRange(ProfileHelper.Phones);
                var deps = Departments.ToList();

                var script =
                    String.Format(
                        @"<script type='text/javascript'>
                                    var departmentsList = {0};
                                    var socContacts = {1};
                                    var otherContacts = {2};
                                    var userId= {3};
                                  
                </script>",
                        JsonConvert.SerializeObject(deps.ConvertAll(item => new
                {
                    id    = item.ID,
                    title = item.Name.HtmlEncode()
                })),
                        JsonConvert.SerializeObject(SocContacts),
                        JsonConvert.SerializeObject(OtherContacts),
                        JsonConvert.SerializeObject(UserInfo.ID));
                Page.ClientScript.RegisterStartupScript(GetType(), Guid.NewGuid().ToString(), script);
            }

            var photoControl = (LoadPhotoControl)LoadControl(LoadPhotoControl.Location);

            loadPhotoWindow.Controls.Add(photoControl);

            Page.Title = HeaderStringHelper.GetPageTitle(GetTitle());
        }
Esempio n. 27
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WeeklyReportDataController"/> class.
        /// </summary>
        public WeeklyReportDataController()
        {
            var userName = this.User.Identity.Name;
            var profile  = ProfileHelper.GetClientUser(userName);
            var config   = new SysConfig();

            this.manager     = new WeeklyReportManager(config, profile);
            this.dataManager = new CADataManager(config, profile);
        }
Esempio n. 28
0
        internal static DataTable GetSpells(string partialName)
        {
            string tableName = ProfileHelper.GetDefinitionValue("SpellTableName");
            string id        = ProfileHelper.GetDefinitionValue("SpellIdColumn");
            string name      = ProfileHelper.GetDefinitionValue("SpellNameColumn");

            return(ExecuteQuery(
                       $"SELECT {id}, {name} FROM {tableName} WHERE {name} LIKE '%" + MySqlHelper.EscapeString(partialName) + "%' ORDER BY Id DESC LIMIT 200;"));
        }
Esempio n. 29
0
        internal static DataTable FindQuestByName(string partialName)
        {
            string tableName = ProfileHelper.GetPrimaryTable(Export.C.Quest);
            string entryId   = ProfileHelper.GetSqlKey(Export.C.Quest, "EntryId");
            string logTitle  = ProfileHelper.GetSqlKey(Export.C.Quest, "LogTitle");

            return(ExecuteQuery(
                       $"SELECT {entryId}, {logTitle} FROM {tableName} WHERE {logTitle} LIKE '%" + MySqlHelper.EscapeString(partialName) + "%' ORDER BY Id DESC LIMIT 200;"));
        }
Esempio n. 30
0
 public override void WriteReportToFile(DataSet reportData, string fileName, BaseReportSettings settings)
 {
     DataTableToExcel(reportData.Tables["Results"], fileName, settings.ReportCode);
     ExcelHelper.Workbook(fileName, b => {
         var ws = (MSExcel._Worksheet)b.Worksheets["rep" + settings.ReportCode.ToString()];
         FormatExcelFile(ws, reportData.Tables["Results"], settings.ReportCaption, CountDownRows);
     });
     ProfileHelper.End();
 }