16,017,954 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by MJ_ (Top 16 by date)
MJ_
18-Jul-13 14:03pm
View
:( Guess I'll response redirect. Seems like there would be a way to do this easily..
MJ_
18-Jun-13 13:20pm
View
The Date isn't NULL because it is part of a join. The Date is actually NULL in the database sometimes.
I have modified the select statement so it is less confusing and only deals with the issue, sorry.
MJ_
18-Jun-13 13:09pm
View
But NULL is not the problem. I want it to pull them when they are NULL. The problem is when there are two rows, one being NULL and the other not being NULL for date. I would only want the one that is not NULL
MJ_
2-Oct-12 15:25pm
View
Yeah after thinking about it I figured to just do that. Was just looking at it sideways I guess :/
MJ_
19-Sep-11 10:31am
View
Trying this but it seems to cause me to crash with this message,
Invalid temp directory in chart handler configuration [~\TempImages\].
MJ_
19-Sep-11 9:20am
View
Yeah I tried looking at that but it is in vb. I tried converting what I saw to c # but couldnt really get it to do what I wanted
MJ_
19-Sep-11 9:19am
View
I use the same thing but there never appears to save the image in that folder that I created. I made a folder called ~/TempImages/ and use everything the same but the server never has any files added to it from what I know.
MJ_
9-Sep-11 9:49am
View
No it's not, but I have half-solved it by enabling and disabling the series instead of deleteing and readding. The only problem is you can't change the series order this way. Sorry there was just no way to paste the important parts of my code so I never did.
MJ_
8-Sep-11 10:47am
View
It wont let me reply with the entire code and it wont let me post the code either. So here is the important parts, everything else works fine.
//btnAppend happens when you first add a series to the listbox. It then
protected void btnAppend_Click(object sender, EventArgs e)
{
string legend = getLegendName();
ListItem liAdded = new ListItem();
liAdded.Text = legend;
liAdded.Value = legend;
foreach (ListItem item in lbSeriesCurrent.Items)
{
if (item.Text == liAdded.Text)
{
lblError.Visible = true;
return;
}
}
foreach (ListItem item in lbSeriesNotShown.Items)
{
if (item.Text == liAdded.Text)
{
lblError.Visible = true;
return;
}
}
populate();
Series addSeries = new Series(legend);
addSeries.ChartType = GetChartType();
addSeries.BorderWidth = 3;
addSeries.ShadowOffset = 2;
DateTime startDtm = tbDateBegin.Text.ToDateTime(m_AdvertisingCollection.Value[0].DateCreated);
DateTime EndDtm = tbDateEnd.Text.ToDateTime(m_AdvertisingCollection.Value.Last().DateCreated);
List<datetime> Periods = new List<datetime>();
List<List<double>> ListCollection = GetDateRange(startDtm, EndDtm, Periods);
List<double> Pages = new List<double>();
int count = 0;
BusAdvertisingCollection AdCollection = m_AdvertisingCollection.Value;
foreach (BusAdvertising item in AdCollection)
{
count = 0;
double itemGraphed = 0;
if (ddlSearchBy.SelectedItem.Value == "NumOfPieces")
itemGraphed = 1;
else if (ddlSearchBy.SelectedItem.Value == "NumOfPages")
itemGraphed = item.NumberOfPages;
else if (ddlSearchBy.SelectedItem.Value == "ComplexityScore")
itemGraphed = item.PageScoreID;
else if (ddlSearchBy.SelectedItem.Value == "TurnaroundTime")
itemGraphed = 1;////////TEMP, not working yet////////////////////////<----------FIX
if (!belongs(item, startDtm, EndDtm))
continue;
if (count + 1 > Periods.Count())
{
//count of 0, no items added within range
}
else if (count + 1 == Periods.Count())
{
//All datapoints fall within one time period
ListCollection[count].Add(itemGraphed);
}
else
{
//Item falls between two ranges of periods
while (count < Periods.Count && item.DateCreated >= Periods[count])
{
count++;
}
ListCollection[count - 1].Add(itemGraphed);
}
}
count = 0;
foreach (List<double> value in ListCollection)
{
string dateAxis = string.Empty;
if (Periods.Count == 1)
dateAxis = startDtm.ToShortDateString() + " - " + EndDtm.AddDays(-1).ToShortDateString();
else if ((count + 1 < Periods.Count))
dateAxis = Periods[count].ToShortDateString() + " - " + Periods[count + 1].AddDays(-1).ToShortDateString();
else
dateAxis = Periods[count].ToShortDateString() + " - " + EndDtm.ToShortDateString();
if (value.Count == 0)
addSeries.Points.AddXY(dateAxis, 0);
else if (cbAvg.Checked)
addSeries.Points.AddXY(dateAxis, value.Average());
else
MJ_
8-Sep-11 10:28am
View
Here is the code for the control that has the graph
///
/// Public ctrl graph class
///
public partial class CtrlBarGraph : System.Web.UI.UserControl
{
private SessionStateVar<busadvertisingcollection> m_AdvertisingCollection;
private SessionStateVar<busregioncollection> m_RegionCollection;
private SessionStateVar<List<series>> m_seriesCollection;
///
/// CtrlBarGraph shows any type of bar graph
///
public CtrlBarGraph()
{
m_AdvertisingCollection = new SessionStateVar<busadvertisingcollection>("advertisingCollection");
m_RegionCollection = new SessionStateVar<busregioncollection>("regionCollection");
m_seriesCollection = new SessionStateVar<List<series>>("seriesCollection", new List<series>());
}
protected void Page_Init(object sender, EventArgs e)
{
chrAdvertising.EnableViewState = true;
}
///
/// Page load event
///
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
//if (chrAdvertising.Series.Count == 0)
// chrAdvertising.Visible = false;
chrAdvertising.ViewStateContent = SerializationContents.Default;
lblError.Visible = false;
int i = 0;
while (i < ddlColorPicker.Items.Count)
{
ddlColorPicker.Items[i].Attributes.Add("style", "background-color:" + ddlColorPicker.Items[i].Value);
i++;
}
}
///
/// ibClicked happens when any image button is clicked.
/// Moves the listitems in the list box either up or down,
/// or moves them between shown and hidden
///
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ibClicked(object sender, EventArgs e)
{
ImageButton ibClicked = sender as ImageButton;
string command = ibClicked.CommandArgument;
if (command == "up")
lbSeriesCurrent.Items.ShiftSelectedUp();
else if (command == "down")
lbSeriesCurrent.Items.ShiftSelectedDown();
else if (command == "hide")
{
foreach (ListItem item in lbSeriesCurrent.Items.GetAllSelected())
{
chrAdvertising.Series.Remove(chrAdvertising.Series.FindByName(item.Value));
}
lbSeriesCurrent.Items.MoveSelectedTo(lbSeriesNotShown.Items, true);
}
else if (command == "show")
lbSeriesNotShown.Items.MoveSelectedTo(lbSeriesCurrent.Items, true);
showGraph();
}
///
/// populates the advertising collection off the session variable
///
protected void populate()
{
if (!m_AdvertisingCollection.IsSet())
{
m_AdvertisingCollection.Value = BusAdvertisingManager.GetALL("DateCreated");
}
}
///
/// Populates the regions from the session variable
///
protected void populateRegions()
{
if (!m_RegionCollection.IsSet())
{
m_RegionCollection.Value = BusRegionManager.GetRegionAll();
}
}
///
/// Appends the current search to the list box
///
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAppend_Click(object sender, EventArgs e)
{
string legend = getLegendName();
ListItem liAdded = new ListItem();
liAdded.Text = legend;
l
MJ_
15-Jun-11 8:51am
View
Pretty good, I'll check it out. 1 month later and I still have the same problem lol.
MJ_
8-Jun-11 14:21pm
View
I would like to make it a control that I am going to have to call for several different paragraphs. Basically a label but with different parts highlighted in different colors. I will highlight until the strings match, then continue unhighlighted until it finds a mismatch. Then it will highlight.
Bascally highlight parts of the label based off if the strings don't match and not highlighting that parts where they do.
MJ_
7-Jun-11 13:12pm
View
Alright. So I'll have a while loop that also has a stack. On the stack I'll push the currant configuration of the function until the stack is empty. Sounds good. (Unless in 3. you meant think of a method that doesn't involve implementing a recursive function by using a while loop and stack. Then I'll have to rethink everything.)
MJ_
13-May-11 9:17am
View
Thats CSV and the link to XML is broken.
I need XML XLS because I need to format the excel file.
MJ_
12-May-11 11:41am
View
I've looked at that and I don't see how that is styling it.
I am currently writing to an XML file and outputing correctly, but where is it that it opens it up in excel and where is it that it formats the data columns?
MJ_
28-Mar-11 16:19pm
View
I tried that and it didn't work. The error is slightly different format too.
I have solved it but it required me to do a system restore back to 1 week ago. For whatever reason it worked fine then and not now. I wish I could be of more help to people that have this problem but this was the only solution I could find.
Show More