Click here to Skip to main content
16,008,010 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Generaltimer control problem1 Pin
Sonia Gupta28-Dec-07 1:31
Sonia Gupta28-Dec-07 1:31 
GeneralRe: timer control problem1 Pin
m v ramana28-Dec-07 19:56
m v ramana28-Dec-07 19:56 
GeneralRe: timer control problem1 Pin
Sonia Gupta28-Dec-07 20:20
Sonia Gupta28-Dec-07 20:20 
Questionhelp help Pin
Member 475249028-Dec-07 1:30
Member 475249028-Dec-07 1:30 
GeneralMultiple violations Pin
leckey28-Dec-07 5:15
leckey28-Dec-07 5:15 
GeneralRe: Multiple violations Pin
neerubee28-Dec-07 18:51
neerubee28-Dec-07 18:51 
Generaltimer control problem Pin
Sonia Gupta28-Dec-07 1:29
Sonia Gupta28-Dec-07 1:29 
Questionhow to read the mpp(ver 2007) file content into xml format using asp.net 2.0?Is it possible to do it r not? Pin
Ramarajit28-Dec-07 1:29
Ramarajit28-Dec-07 1:29 
Basically am not much familiar with asp.net.i searched and got this below
stuff in coding...but its throwing error when creating a new instance for
the ApplicationClass.i have included the Interop.PJCALLib.dll and
Interop.Office.dll in the bin directory....is it related some other rights
issue....but sometimes its work but displaying the exception like "YOU R NOT
AUTHORIZED TO VIEW THIS PAGE"....Could anyone plz explain how to solve this
issue......even the approach itself is wrong means kindly suggest me
something to proceed it further.......am in mess....i hope i can get the
apet solution from u ASAP...


Here is the coding watever i have done....if anything is wrong kindly
correct me then & there...

thanks in advance!


using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Microsoft.Office.Interop.MSProject;

public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
ApplicationClass appSampleProject = new ApplicationClass();

object oMissing = Type.Missing;

string strFileName = "C:\\Documents and
Settings\\ram.ENTERPRISE\\Desktop\\RevisedProjectPlan";//just for checking i
thought to read the mpp file which ia available in desktop...am i doing it
right r i need to go for some other approach in getting file path..kindly
guide me

bool bOpen = false;

bOpen = appSampleProject.FileOpen(strFileName, true,
PjMergeType.pjDoNotMerge, oMissing, oMissing, oMissing, oMissing, oMissing,
oMissing, oMissing, oMissing, PjPoolOpen.pjDoNotOpenPool, oMissing,
oMissing, oMissing, oMissing);


if (bOpen)
{
Project proSample = appSampleProject.ActiveProject;
Task tSampleTsk;
DataSet dsDataset = new DataSet();
DataColumn dcCol;
DataRow drRow;
DataTable dtTable = new DataTable();
dsDataset.Tables.Add(dtTable);

dcCol = new DataColumn();
dcCol.ColumnName = "Sr. No.";
dcCol.DataType = System.Type.GetType("System.Int32");
dtTable.Columns.Add(dcCol);

dcCol = new DataColumn();
dcCol.ColumnName = "Name";
dcCol.DataType = System.Type.GetType("System.String");
dtTable.Columns.Add(dcCol);

dcCol = new DataColumn();
dcCol.ColumnName = "Level";
dcCol.DataType = System.Type.GetType("System.Int32");
dtTable.Columns.Add(dcCol);

dcCol = new DataColumn();
dcCol.ColumnName = "Start";
dcCol.DataType = System.Type.GetType("System.String");
dtTable.Columns.Add(dcCol);

dcCol = new DataColumn();
dcCol.ColumnName = "Duration";
dcCol.DataType = System.Type.GetType("System.String");
dtTable.Columns.Add(dcCol);

dcCol = new DataColumn();
dcCol.ColumnName = "Hours";
dcCol.DataType = System.Type.GetType("System.String");
dtTable.Columns.Add(dcCol);

dcCol = new DataColumn();
dcCol.ColumnName = "Finish";
dcCol.DataType = System.Type.GetType("System.String");
dtTable.Columns.Add(dcCol);

dcCol = new DataColumn();
dcCol.ColumnName = "Resource Names";
dcCol.DataType = System.Type.GetType("System.String");
dtTable.Columns.Add(dcCol);

string strLevel;
int iCount;
int ilevelLth;


for (iCount = 1; iCount <= proSample.Tasks.Count; iCount++)
{

drRow = dtTable.NewRow();
tSampleTsk = proSample.Tasks[iCount];
string strWBSID = tSampleTsk.WBS.ToString();
drRow["Name"] = tSampleTsk.Name.ToString();
strLevel = tSampleTsk.WBS.ToString();
int iLevel = 1;
for (ilevelLth = 0; ilevelLth < strLevel.Length;
ilevelLth++)
{
if (strLevel[ilevelLth] == '.')
iLevel++;
}
drRow["Sr. No."] = iCount;
drRow["Level"] = iLevel;

drRow["Start"] = tSampleTsk.Start.ToString();
drRow["Duration"] = tSampleTsk.Duration.ToString();
drRow["Finish"] = tSampleTsk.Finish.ToString();
drRow["Resource Names"] =
tSampleTsk.ResourceNames.ToString();

dtTable.Rows.Add(drRow);

}
gvSamPro.DataSource = dsDataset;
gvSamPro.DataBind();
}

}
}

Please help me
Questionvb.net to c# Pin
Sonia Gupta28-Dec-07 1:14
Sonia Gupta28-Dec-07 1:14 
GeneralRe: vb.net to c# Pin
sulabh202028-Dec-07 1:27
sulabh202028-Dec-07 1:27 
GeneralRe: vb.net to c# Pin
Colin Angus Mackay28-Dec-07 1:33
Colin Angus Mackay28-Dec-07 1:33 
GeneralRe: vb.net to c# Pin
Colin Angus Mackay28-Dec-07 1:33
Colin Angus Mackay28-Dec-07 1:33 
GeneralRe: vb.net to c# Pin
neerubee28-Dec-07 18:54
neerubee28-Dec-07 18:54 
GeneralEnable C# code inside Javascript Pin
naoufelabs28-Dec-07 0:45
professionalnaoufelabs28-Dec-07 0:45 
QuestionHow to fix this error? Pin
Ramarajit28-Dec-07 0:42
Ramarajit28-Dec-07 0:42 
AnswerRe: urgent,kindly plz help ASAP Pin
leckey28-Dec-07 5:18
leckey28-Dec-07 5:18 
Questionajax problem Pin
Sonia Gupta28-Dec-07 0:08
Sonia Gupta28-Dec-07 0:08 
GeneralRe: ajax problem Pin
KennyPatel29-Dec-07 0:55
KennyPatel29-Dec-07 0:55 
GeneralHandling the events of a web page Pin
M. J. Jaya Chitra28-Dec-07 0:08
M. J. Jaya Chitra28-Dec-07 0:08 
Questionhow can we add a css tooltip to the grid view Pin
jagan12327-Dec-07 23:13
jagan12327-Dec-07 23:13 
AnswerRe: how can we add a css tooltip to the grid view Pin
KennyPatel29-Dec-07 1:00
KennyPatel29-Dec-07 1:00 
Generalstring Vs String in C# Pin
Venkatesh Mookkan27-Dec-07 22:49
Venkatesh Mookkan27-Dec-07 22:49 
GeneralRe: string Vs String in C# Pin
Sun Rays27-Dec-07 23:00
Sun Rays27-Dec-07 23:00 
GeneralRe: string Vs String in C# Pin
Blumen27-Dec-07 23:20
Blumen27-Dec-07 23:20 
QuestionHow can I prevent user from resubmitting Button Pin
Blumen27-Dec-07 22:29
Blumen27-Dec-07 22:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.