//------------------Panel1------------------------------------- #region EntryKeyword public void LoadData() { try { DataSet ds = KBLL.LoadInfo(KBLL); gvItem.DataSource = ds.Tables[0]; gvItem.DataBind(); foreach (GridViewRow row in gvItem.Rows) { string Data = row.Cells[7].Text.ToString(); Data = cc.DTGet_Local(Data); row.Cells[7].Text = Data; } GridView1.DataSource = ds.Tables[0]; GridView1.DataBind(); foreach (GridViewRow row in GridView1.Rows) { string Data = row.Cells[5].Text.ToString(); if (Data == "1") { Data = "Myct"; } else if (Data == "2") { Data = "Udisecce"; } else if (Data == "3") { Data = "School"; } else if (Data == "4") { Data = "Android Mobile Apps"; } row.Cells[5].Text = Data; } } catch (Exception ex) { throw ex; } }
private void gvdisplayshow() { // DateTime date = DateTime.Now; //string todaysDate = date.ToShortDateString(); string date = System.DateTime.Now.ToString(); //string todaysDate = date.ToShortDateString(); string todaysDate = cc.DTInsert_Local(date); string UserName = Convert.ToString(Session["MarketingUser"]); sql = "select roleid from AdminSubMarketingSubUser where friendid='" + UserName + "'"; roleid = cc.ExecuteScalar(sql); if (roleid == "2") { sql = "select top 1 p3,p5,p7,send_date from CELevel1 where sender_mobileno='" + UserName + "' and send_date='" + todaysDate + "' "; DataSet ds = cc.ExecuteDataset(sql); gvdisplay.DataSource = ds.Tables[0]; gvdisplay.DataBind(); foreach (GridViewRow row in gvdisplay.Rows) { string Data = row.Cells[3].Text.ToString(); Data = cc.DTGet_Local(Data); row.Cells[3].Text = Data; } } else if (roleid == "3") { sql = "select top 1 p3,p5,p7,send_date from SELevel2 where sender_mobileno='" + UserName + "' and send_date='" + todaysDate + "' "; DataSet ds = cc.ExecuteDataset(sql); gvdisplay.DataSource = ds.Tables[0]; gvdisplay.DataBind(); foreach (GridViewRow row in gvdisplay.Rows) { string Data = row.Cells[3].Text.ToString(); Data = cc.DTGet_Local(Data); row.Cells[3].Text = Data; } } else if (roleid == "4") { sql = "select top 1 p3,p5,p7,send_date from EELevel3 where sender_mobileno='" + UserName + "' and send_date='" + todaysDate + "' "; DataSet ds = cc.ExecuteDataset(sql); gvdisplay.DataSource = ds.Tables[0]; gvdisplay.DataBind(); foreach (GridViewRow row in gvdisplay.Rows) { string Data = row.Cells[3].Text.ToString(); Data = cc.DTGet_Local(Data); row.Cells[3].Text = Data; } } else if (roleid == "5") { sql = "select top 1 p3,p5,p7,send_date from DataCollection where ref_id='" + UserName + "' and send_date='" + todaysDate + "' "; DataSet ds = cc.ExecuteDataset(sql); gvdisplay.DataSource = ds.Tables[0]; gvdisplay.DataBind(); foreach (GridViewRow row in gvdisplay.Rows) { string Data = row.Cells[3].Text.ToString(); Data = cc.DTGet_Local(Data); row.Cells[3].Text = Data; } } else { } }