Click here to Skip to main content
15,911,315 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: help in ItemCreated method plus javascript Pin
Brian W King13-May-09 7:29
Brian W King13-May-09 7:29 
GeneralRe: help in ItemCreated method plus javascript Pin
Ramesh Swaminathan13-May-09 7:37
Ramesh Swaminathan13-May-09 7:37 
GeneralRe: help in ItemCreated method plus javascript Pin
Brian W King13-May-09 9:35
Brian W King13-May-09 9:35 
GeneralRe: help in ItemCreated method plus javascript Pin
Sujay chakraborty13-May-09 18:26
Sujay chakraborty13-May-09 18:26 
Questionc# with Linq help getting box checked in database Pin
Franklinlloyd13-May-09 5:32
Franklinlloyd13-May-09 5:32 
AnswerRe: c# with Linq help getting box checked in database Pin
Christian Graus13-May-09 6:04
protectorChristian Graus13-May-09 6:04 
AnswerRe: c# with Linq help getting box checked in database Pin
Brian W King13-May-09 9:33
Brian W King13-May-09 9:33 
GeneralRe: c# with Linq help getting box checked in database Pin
Franklinlloyd13-May-09 9:51
Franklinlloyd13-May-09 9:51 
protected void Submit_Advt_Click(object sender, EventArgs e)
{
// Add Code to add/edit/delete Advertisers (Possible case statement goes here?)
switch (RBLFunctions.SelectedValue)
{
case "Edit":
EditAdvertiser();
break;
case "Delete":
DeleteAdvertiser();
break;
case "Approve":
ApproveAdvertiser();
break;
}
}

protected void EditAdvertiser()
{
// Add Code to add/edit/delete events (Possible case statement goes here?)
DataService ds = new DataService(int.Parse(ConfigurationManager.AppSettings["ConnStr"]));

int selectedEvent = int.Parse(DDLSelections.SelectedValue);

// This is LINQ to Objects, so you get to learn a little LINQ too
Advertiser Pro = (from pr in CurrentAdvertser
where pr.AdvertiserId == selectedEvent
select pr).First();

// use the evnt object to load the textboxes like this:
Pro.Name= txtadvt_nm.Text;
Pro.Company = Txtcompany_nm.Text;
Pro.Email = txtcontactemail.Text;
Pro.Phone = nbr_contactphone.Text;
Pro.OriginalComments = txtcomment.Text;
Pro.IsApproved = ind_approved.Checked;
Pro.ImagePath = txtimagepath.Text;
Pro.DateFormFilled = DateTime.Parse(dt_Date.Text);
ds.updateAdvertiser(Pro);

Response.Redirect("Advertisers.aspx");


}
protected void DeleteAdvertiser()
{
// Add Code to add/edit/delete events (Possible case statement goes here?)
DataService ds = new DataService(int.Parse(ConfigurationManager.AppSettings["ConnStr"]));

int selectedEvent = int.Parse(DDLSelections.SelectedValue);


ds.removeAdvertiser(selectedEvent);

Response.Redirect("Advertisers.aspx");
}


protected void ApproveAdvertiser()
{
//Add Code to add/edit/delete events (Possible case statement goes here?)
DataService ds = new DataService(int.Parse(ConfigurationManager.AppSettings["ConnStr"]));

Advertiser adv = new Advertiser();
adv.AdvertiserId = 0;

adv.Approver = ind_approved.Checked;
ds.approveAdvertiser(adv, ValuePassedIn);

Response.Redirect("Advertisers.aspx");
}

protected void BDelete_Click(object sender, EventArgs e)
{
if (RBLFunctions.SelectedValue.Equals("Delete"))
{

DeleteAdvertiser();
Response.Redirect("Advertisers.aspx");
}
else
{
if (RBLDelete.SelectedValue.Equals("Yes"))
{
//ApproveAdvertiser(true);
}
else
{
//ApproveAdvertiser(false);
}
Response.Redirect("Advertisers.aspx");
}
}
protected void RBLDelete_SelectedIndexChanged(object sender, EventArgs e)
{
if (RBLDelete.SelectedValue.Equals("Yes"))
{
BDelete.Enabled = true;
}
else
{
if (RBLFunctions.SelectedValue.Equals("Approve"))
{
BDelete.Enabled = true;
}
else
{
Response.Redirect("Advertisers.aspx");
}

}
}

}
QuestionAccess server side data from client side Pin
dptalt13-May-09 5:19
dptalt13-May-09 5:19 
AnswerRe: Access server side data from client side Pin
AlexeiXX313-May-09 5:42
AlexeiXX313-May-09 5:42 
GeneralRe: Access server side data from client side Pin
dptalt13-May-09 7:23
dptalt13-May-09 7:23 
GeneralRe: Access server side data from client side Pin
dptalt14-May-09 3:44
dptalt14-May-09 3:44 
QuestionProblem with Compiling a WEb Setup Project Pin
Vimalsoft(Pty) Ltd13-May-09 5:10
professionalVimalsoft(Pty) Ltd13-May-09 5:10 
QuestionExcel Error System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC PinPopular
DotNetCoderJunior13-May-09 4:48
DotNetCoderJunior13-May-09 4:48 
AnswerRe: Excel Error System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC Pin
MidwestLimey13-May-09 5:38
professionalMidwestLimey13-May-09 5:38 
GeneralRe: Excel Error System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC Pin
DotNetCoderJunior13-May-09 20:07
DotNetCoderJunior13-May-09 20:07 
AnswerRe: Excel Error System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC Pin
moslem52228-Dec-10 19:35
moslem52228-Dec-10 19:35 
AnswerRe: Excel Error System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC Pin
Ramesh Swaminathan13-May-09 7:06
Ramesh Swaminathan13-May-09 7:06 
GeneralRe: Excel Error System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC Pin
DotNetCoderJunior13-May-09 20:29
DotNetCoderJunior13-May-09 20:29 
AnswerRe: Excel Error System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC Pin
sarang.c++28-Dec-11 19:39
sarang.c++28-Dec-11 19:39 
QuestionLoading Control along with Javascript on ajax Call Pin
Rizwan Bashir13-May-09 3:09
Rizwan Bashir13-May-09 3:09 
Questionworking with iis 7.0 Pin
aamirzada13-May-09 2:07
aamirzada13-May-09 2:07 
AnswerRe: working with iis 7.0 Pin
Abhijit Jana13-May-09 3:39
professionalAbhijit Jana13-May-09 3:39 
QuestionNeed help regarding Trust Level Error Pin
rockinkash13-May-09 1:56
rockinkash13-May-09 1:56 
AnswerRe: Need help regarding Trust Level Error Pin
logicaldna15-Jun-09 20:24
logicaldna15-Jun-09 20:24 

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.