<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Transition.aspx.cs" Inherits="Transition" %> <%@ Import Namespace = "System.Data.SqlClient" %> <%@ Import Namespace = "System.Data" %> <%@ Import Namespace="System.Configuration" %> Chief Executive - CEO Transitions

CE Online brings to its readers a weekly update on the changes that occur at the top or the CEO and C-Suite level in Corporate America. Here is the latest update.

<% string constring = ConfigurationManager.ConnectionStrings["conn"].ToString(); SqlConnection con = new SqlConnection(constring); SqlCommand cmd = new SqlCommand(); string stmt = ""; cmd.Connection = con; SqlDataAdapter sda; DataSet ds = new DataSet(); int i = 0; string header = ""; string inntext = ""; int to; int frm; if (IsSearch == false) { if (SeaPaging == false) { stmt = " select rtrim(CEOName) as CEOName,FutureMoves, CompanyName, case IsNull(Period, '') when '' then '' else '( '+Period+' )' end as Period, " + " IndustryType,Period,ExecutiveTitle,Reason, SucPre = case isnull(PreviousRole,'') when '' "+ " then Successor "+ "else Successor+' / '+PreviousRole end, "+ " CompEst = case isnull(EstimatedSeverance,'') when '' then isnull(TotalCompensation,'') "+ " else isnull(TotalCompensation,'')+' / '+EstimatedSeverance end "+ " from CEOTrans order by UploadedDate desc"; // stmt = "select CEOName,header = case isnull(Period,'') when '' then ' of ' +CompanyName else ' of ' //+CompanyName + '(' + Period + ')' end,IndustryType,Period,ExecutiveTitle,Reason,SucPre = case isnull(PreviousRole,'') when //'' then Successor else Successor+' / '+PreviousRole end, CompEst = case isnull(EstimatedSeverance,'') when '' then //isnull(TotalCompensation,'') else isnull(TotalCompensation,'')+' / '+EstimatedSeverance end from CEOTrans"; cmd.CommandText = stmt; sda = new SqlDataAdapter(cmd); sda.Fill(ds); if (ds.Tables[0].Rows.Count == 0) { Response.Write("
Oops! Sorry, No Records.
"); return; } } else { stmt = " select rtrim(CEOName) as CEOName,FutureMoves, CompanyName, case IsNull(Period, '') when '' then '' else '( '+Period+' )' end as Period, " + " IndustryType,Period,ExecutiveTitle,Reason, SucPre = case isnull(PreviousRole,'') when '' " + " then Successor " + "else Successor+' / '+PreviousRole end, " + " CompEst = case isnull(EstimatedSeverance,'') when '' then isnull(TotalCompensation,'') " + " else isnull(TotalCompensation,'')+' / '+EstimatedSeverance end " + " from CEOTrans"; //stmt = "select CEOName,header = case isnull(Period,'') when '' then ' of ' +CompanyName else ' of ' +CompanyName + '(' + Period + ')' end,IndustryType,Period,ExecutiveTitle,Reason,SucPre = case isnull(PreviousRole,'') when '' then Successor else Successor+' / '+PreviousRole end, CompEst = case isnull(EstimatedSeverance,'') when '' then isnull(TotalCompensation,'') else isnull(TotalCompensation,'')+' / '+EstimatedSeverance end from CEOTrans"; stmt = stmt + " where CEOName like '%" + txtSearch.Text.ToString() + "%' or CompanyName like '%" + txtSearch.Text.ToString() + "%' order by UploadedDate desc"; cmd.CommandText = stmt; sda = new SqlDataAdapter(cmd); sda.Fill(ds); } count = ds.Tables[0].Rows.Count; to = RecPerPage * num; frm = to - (num); if (to > count) { to = count; frm = to - (count % num); } while (frm < to) { DataRow dr = ds.Tables[0].Rows[frm]; header = "" + dr["CEOName"].ToString() + " " + " " + " of " + " " + " " + dr["CompanyName"].ToString() + " " + dr["Period"].ToString() + "
"; //header = "" + "" + dr["CEOName"].ToString() + "" + dr["header"].ToString(); //inntext = "
Industry Type:
" + dr["IndustryType"].ToString() + "
Executive Title:
" + dr["ExecutiveTitle"].ToString() + "
Reason:
" + dr["Reason"].ToString() + "
"; //inntext = inntext + "
Period
" + dr["Period"].ToString() + "
Successor / Previous Role
" + dr["SucPre"].ToString() + "
"; //inntext = inntext + "
Total Compensation / Severance(USD $)
" + dr["CompEst"].ToString() + "
"; int cn = 0; while (cn < dr.ItemArray.Length) { if (dr[cn].ToString() == "") { dr[cn] = '-'; } cn++; } inntext = "
Industry Type:
" + dr["IndustryType"].ToString() + "
Executive Title:
" + dr["ExecutiveTitle"].ToString() + "
Reason:
" + dr["Reason"].ToString() + "
"; inntext = inntext + "
Period:
" + dr["Period"].ToString() + "
Successor / Previous Role:
" + dr["SucPre"].ToString() + "
"; inntext = inntext + "
Total Compensation / Severance (USD $):
" + dr["CompEst"].ToString() + "
" + "
Future Moves:
" + dr["FutureMoves"].ToString() + "
"; if (i == 0) { Response.Write("
" + header + "
"); Response.Write("
" + inntext + "
"); } else { //Response.Write("
"); Response.Write("
" + header + "
"); Response.Write("
" + inntext + "
"); //Response.Write("
"); } i++; frm++; } } else { stmt = " select rtrim(CEOName) as CEOName,FutureMoves, CompanyName, case IsNull(Period, '') when '' then '' else '( '+Period+' )' end as Period, " + " IndustryType,Period,ExecutiveTitle,Reason, SucPre = case isnull(PreviousRole,'') when '' " + " then Successor " + "else Successor+' / '+PreviousRole end, " + " CompEst = case isnull(EstimatedSeverance,'') when '' then isnull(TotalCompensation,'') " + " else isnull(TotalCompensation,'')+' / '+EstimatedSeverance end " + " from CEOTrans "; // stmt = "select CEOName,header = case isnull(Period,'') when '' then ' of ' +CompanyName else ' of ' +CompanyName + '(' + Period + ')' end,IndustryType,Period,ExecutiveTitle,Reason,SucPre = case isnull(PreviousRole,'') when '' then Successor else Successor+' / '+PreviousRole end, CompEst = case isnull(EstimatedSeverance,'') when '' then isnull(TotalCompensation,'') else isnull(TotalCompensation,'')+' / '+EstimatedSeverance end from CEOTrans"; stmt = stmt + " where CEOName like '%" + txtSearch.Text.ToString() + "%' or CompanyName like '%" + txtSearch.Text.ToString() + "%' order by UploadedDate desc"; cmd.CommandText = stmt; sda = new SqlDataAdapter(cmd); sda.Fill(ds); if (ds.Tables[0].Rows.Count > 0) { DataTable dt = ds.Tables[0]; if (ds.Tables[0].Rows.Count <= num) { lnkFirst.Visible = false; lnkLast.Visible = false; lnkNext.Visible = false; lnkPrev.Visible = false; foreach (DataRow dr in dt.Rows) { header = "" + dr["CEOName"].ToString() + " " + " " + " of " + " " + " " + dr["CompanyName"].ToString() + " " + dr["Period"].ToString() + "
"; //header = "" + dr["CEOName"].ToString() + "" + dr["header"].ToString(); //inntext = "
Industry Type:
" + dr["IndustryType"].ToString() + "
Executive Title:
" + dr["ExecutiveTitle"].ToString() + "
Reason:
" + dr["Reason"].ToString() + "
"; //inntext = inntext + "
Period
" + dr["Period"].ToString() + "
Successor / Previous Role
" + dr["SucPre"].ToString() + "
"; //inntext = inntext + "
Total Compensation / Severance (USD $)
" + dr["CompEst"].ToString() + "
"; int cn = 0; while (cn < dr.ItemArray.Length) { if (dr[cn].ToString() == "") { dr[cn] = '-'; } cn++; } inntext = "
Industry Type:
" + dr["IndustryType"].ToString() + "
Executive Title:
" + dr["ExecutiveTitle"].ToString() + "
Reason:
" + dr["Reason"].ToString() + "
"; inntext = inntext + "
Period:
" + dr["Period"].ToString() + "
Successor / Previous Role:
" + dr["SucPre"].ToString() + "
"; inntext = inntext + "
Total Compensation / Severance (USD $):
" + dr["CompEst"].ToString() + "
" + "
Future Moves:
" + dr["FutureMoves"].ToString() + "
"; if (i == 0) { Response.Write("
" + header + "
"); Response.Write("
" + inntext + "
"); } else { // Response.Write("
"); Response.Write("
" + header + "
"); Response.Write("
" + inntext + "
"); //Response.Write("
"); } i++; } } else { RecPerPage = 1; lnkFirst.Enabled = false; lnkPrev.Enabled = false; lnkLast.Enabled = true; lnkNext.Enabled = true; count = ds.Tables[0].Rows.Count; to = RecPerPage * num; frm = to - (num); IsSearch = false; SeaPaging = true; if (to > count) { to = count; frm = to - (count % num); } while (frm < to) { DataRow dr = ds.Tables[0].Rows[frm]; header = "" + dr["CEOName"].ToString() + " " + " " + " of " + " " + " " + dr["CompanyName"].ToString() + " " + dr["Period"].ToString() + "
"; //header = "" + dr["CEOName"].ToString() + "" + dr["header"].ToString(); //inntext = "
Industry Type:
" + dr["IndustryType"].ToString() + "
Executive Title:
" + dr["ExecutiveTitle"].ToString() + "
Reason:
" + dr["Reason"].ToString() + "
"; //inntext = inntext + "
Period
" + dr["Period"].ToString() + "
Successor / Previous Role
" + dr["SucPre"].ToString() + "
"; //inntext = inntext + "
Total Compensation / Severance (USD $)
" + dr["CompEst"].ToString() + "
"; int cn = 0; while (cn < dr.ItemArray.Length) { if (dr[cn].ToString() == "") { dr[cn] = '-'; } cn++; } inntext = "
Industry Type:
" + dr["IndustryType"].ToString() + "
Executive Title:
" + dr["ExecutiveTitle"].ToString() + "
Reason:
" + dr["Reason"].ToString() + "
"; inntext = inntext + "
Period:
" + dr["Period"].ToString() + "
Successor / Previous Role:
" + dr["SucPre"].ToString() + "
"; inntext = inntext + "
Total Compensation / Severance (USD $):
" + dr["CompEst"].ToString() + "
" + "
Future Moves:
" + dr["FutureMoves"].ToString() + "
"; if (i == 0) { Response.Write("
" + header + "
"); Response.Write("
" + inntext + "
"); } else { // Response.Write("
"); Response.Write("
" + header + "
"); Response.Write("
" + inntext + "
"); //Response.Write("
"); } i++; frm++; } } } else { Response.Write("
No Records match!
"); lnkFirst.Visible = false; lnkLast.Visible = false; lnkNext.Visible = false; lnkPrev.Visible = false; } } %>
| | |   

Advanced Search

Search: