Prasad Bhagat

Prasad Bhagat

  • NA
  • 516
  • 234.9k

inside gridview linkbutton onclientclick not firing

Aug 6 2014 5:33 AM
Dear all,
 
i have a gridview inside gridview linkbutton as a(lbStatus)  will be there but i wrote onclientclick event but its not firing pls help me asap.
 i want to disply  a popup for updating the status but event is not firing pls help me.
 
 
 
Serchcunsultatnt.aspx
 
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Site1.Master" EnableEventValidation="false" CodeBehind="Search_Consultants.aspx.cs" Inherits="Gateway.Web.Admin.Search_Consultants" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="Content1" runat="server" contentplaceholderid="cphBody">


<asp:UpdatePanel ID="upd" runat="server">
<Triggers>
<asp:PostBackTrigger ControlID="btnExportExce" />
<asp:PostBackTrigger ControlID="btnEmail" />
<asp:PostBackTrigger ControlID="btnSendEmail" />
</Triggers>
<ContentTemplate>
<table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<table class="quicksearch" style="width:100%;">
<tr>
<td> <strong><strong>Search Profiles</strong></strong>
</td>
<td width="200">
<asp:Label ID="lblSearchCount" runat="server"></asp:Label>
</td>
</tr>
</table>

</td>
</tr>
<tr>
<td><table class="newemp" style="width:100%;">
<tr>
<td class="auto-style1">Op#</td>
<td>
<asp:TextBox ID="txtOpeningCode" runat="server" MaxLength="5" Width="60px"></asp:TextBox>
<asp:FilteredTextBoxExtender ID="txtOpCode_FilteredTextBoxExtender" runat="server" Enabled="True" FilterType="Numbers" TargetControlID="txtOpeningCode">
</asp:FilteredTextBoxExtender>
</td>
<td>Opening Name</td>
<td>
<asp:TextBox ID="txtOpeningName" runat="server" MaxLength="50" Width="70px"></asp:TextBox>
</td>
<td class="auto-style3">Candidate Name</td>
<td>
<asp:TextBox ID="txtCandidateName" runat="server" MaxLength="100" Width="70px"></asp:TextBox>
</td>
<td>Email Id</td>
<td>
<asp:TextBox ID="txtEmailId" runat="server" MaxLength="100" Width="70px"></asp:TextBox>
</td>
<td>
Profile Status</td>
<td>
<asp:DropDownList ID="ddlProfStatus" runat="server" Width="80px"> </asp:DropDownList></td>
<td>
Country</td>
<td>
<asp:DropDownList ID="ddlCountry" runat="server" Width="80px">
</asp:DropDownList>
</td>
<td>From</td>
<td>
<asp:TextBox ID="txtFroDate" runat="server" MaxLength="35" Width="80px"></asp:TextBox>
<asp:CalendarExtender ID="txtFroDate_CalendarExtender" runat="server" Format="dd/MM/yyyy" Enabled="True" TargetControlID="txtFroDate">
</asp:CalendarExtender>
</td>
<td>
<asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" CssClass="regbutt"/>
</td>
</tr>
<tr>
<td class="auto-style1">Contact Number</td>
<td>
<asp:TextBox ID="txtMobile" runat="server" MaxLength="15" Width="60px"></asp:TextBox>
</td>
<td>Notice Period</td>
<td>
<asp:TextBox ID="txtNotice" runat="server" MaxLength="15" Width="70px"></asp:TextBox>
</td>
<td class="auto-style3">Recruiter </td>
<td>
<asp:TextBox ID="txtRecruiterName" runat="server" MaxLength="15" Width="70px"></asp:TextBox>
</td>
<td>Key Skills</td>
<td>
<asp:TextBox ID="txtKeySkill" runat="server" MaxLength="35" Width="70px"></asp:TextBox>
</td>
<td>
Date</td>
<td>
<asp:TextBox ID="txtPostedDate" runat="server" MaxLength="35" Width="70px"></asp:TextBox>
<asp:CalendarExtender ID="txtPostedDate_CalendarExtender" runat="server" Format="dd/MM/yyyy" Enabled="True"
TargetControlID="txtPostedDate">
</asp:CalendarExtender>
</td>

<td>
Client</td>

<td>
<asp:DropDownList ID="ddlClient" runat="server" Width="80px">
</asp:DropDownList>
</td>

<td>To</td>
<td>
<asp:TextBox ID="txtToDate" runat="server" MaxLength="35" Width="80px"></asp:TextBox>
<asp:CalendarExtender ID="txtToDate_CalendarExtender" runat="server" Enabled="True" Format="dd/MM/yyyy" TargetControlID="txtToDate">
</asp:CalendarExtender>
</td>

<td>
<asp:Button ID="btnClear" runat="server" Text="Clear" OnClick="btnClear_Click" CssClass="clearbutt"/>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" Visible="False" />
</td>

</tr>

</table></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>
<asp:GridView ID="gvRef" runat="server" CellPadding="3"
CssClass="mGrid" AlternatingRowStyle-CssClass="alt" PagerStyle-CssClass="pgr" AllowSorting="true"
AutoGenerateColumns="False" DataKeyNames="id" OnPageIndexChanging ="gvRef_PageIndexChanging"
PageSize="15" AllowPaging="true" OnRowDataBound="gvRef_RowDataBound" OnSorting="gvRef_Sorting" OnRowCommand="gvRef_RowCommand">
<PagerSettings Mode="Numeric"/>
<RowStyle />
<Columns>
<asp:TemplateField HeaderText="Opening Code" Visible="false">
<ItemTemplate>
<asp:Label ID="lblOpId" runat="server" Text='<%# Eval("id")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle Horizontal />
</asp:TemplateField>
<asp:TemplateField HeaderText="OP#">
<ItemTemplate>
<asp:Label ID="lblOpeningCode" runat="server" Text='<%# Eval("opening_code")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Client">
<ItemTemplate>
<asp:Label ID="lblClientName" runat="server" Text='<%# Eval("Client")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Opening Name" SortExpression="opening_name">
<ItemTemplate>
<asp:Label ID="lblOpName" ToolTip='<%# Eval("COUNTRY")%>' Width="120px" runat="server" Text='<%# Eval("opening_name")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Submitted By" SortExpression="submitted_by_name">
<ItemTemplate>
<asp:Label ID="lblAddedBy" runat="server" Text='<%# Eval("submitted_by_name")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Submitted Date" SortExpression="submitted_date">
<ItemTemplate>
<asp:Label ID="lblSubmittedDate" runat="server" Text='<%# Eval("submitted_date")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Candidate Name">
<ItemTemplate>
<asp:HyperLink ID="hlAssign" ToolTip='<%# "Marital Status : " + Eval("marital_status") +"\n"+"Payroll type : " + Eval("EMP_TYPE")+"\n"+"Profile Status : " + Eval("profile_status")%>' runat="server" NavigateUrl='<%# "~/Admin/ViewConsultant.aspx?id=" + Eval("id") %>' >

<asp:Label ID="lblClient" Width="120px" runat="server" Text='<%# Eval("candidate_name")%>'></asp:Label></asp:HyperLink>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Notice Period">
<ItemTemplate>
<asp:Label ID="lblNotice" runat="server" Text='<%# Eval("notice_period")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Exp. Years">
<ItemTemplate>
<asp:Label ID="lblExp" runat="server" Text='<%# Eval("exp_years")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Current Package">
<ItemTemplate>
<asp:Label ID="lblCurrentPkg" runat="server" Text='<%# Eval("current_package")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Offered Package">
<ItemTemplate>
<asp:Label ID="lblOffPkg" runat="server" Text='<%# Eval("proposed_package")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Current Location" Visible="false">
<ItemTemplate>

</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Current Org. / Location">
<ItemTemplate>
<asp:Label ID="lblCurrORg" runat="server" Text='<%# Eval("current_organization")%>'></asp:Label>
<br /><asp:Label ID="lblCurrLoc" runat="server" Text='<%# Eval("current_location")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Contact Details">
<ItemTemplate>
<asp:Label ID="lblEmail" runat="server" Text='<%# Eval("email_address")%>'></asp:Label><br />
<asp:Label ID="lblContactNumber" runat="server" Text='<%# Eval("contact_number")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Key Skills">
<ItemTemplate>

<asp:Label ID="lblKeySkills" ToolTip='<%#Eval("key_skills")%>' runat="server" Width="80" Text='<%# Eval("key_skills").ToString().Length>15 ? Eval("key_skills").ToString().Substring(0,14) : (Eval("Key_skills") != null ? Eval("key_skills"):"")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle Width="8%" Horizontal />
</asp:TemplateField>
<asp:TemplateField HeaderText="Edit">
<ItemTemplate>
<asp:HyperLink ID="hlEdit" Width="50" runat="server" NavigateUrl='<%# "~/Admin/AddEditConsultant.aspx?id=" + Eval("id") %>' >E Profile</asp:HyperLink>

<br /><asp:LinkButton ID="lbStatus" runat="server" CausesValidation="false" OnClientClick="lbStatus_Click">E Status</asp:LinkButton>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
</asp:TemplateField>

<asp:TemplateField HeaderText="Profile">
<ItemTemplate>
<asp:HyperLink ID="hldownload" ToolTip="Base Profile" runat="server" NavigateUrl='<%# "~/Admin/handlers/filehandler.ashx?id=" + Eval("id") %>' Text ="BP"></asp:HyperLink>
<asp:HyperLink ID="hlFp" runat="server" ToolTip="Formatted Profile" NavigateUrl='<%# "~/Admin/handlers/filehandler.ashx?id=" + Eval("id") +"&type=formatted" %>' Text ="FP"></asp:HyperLink>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" Width="5%" />
</asp:TemplateField>

<asp:TemplateField HeaderText="Change Status" Visible="false">
<ItemTemplate>

</ItemTemplate>
<ItemStyle HorizontalAlign="Center" Width="1%" />
</asp:TemplateField>
<asp:TemplateField >
<HeaderTemplate>

<asp:CheckBox ID="chkAll" runat="server" onclick="javascript: SelectAllCheckboxes1(this);"/>
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="chkSubmit" runat="server" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" Width="1%" />
</asp:TemplateField>

</Columns>
<PagerStyle Font-Bold="True" Font-Size="14pt" />


<EmptyDataTemplate>
<b>No Profiles ...</b>
</EmptyDataTemplate>
<HeaderStyle/>
<AlternatingRowStyle CssClass="alt" />
</asp:GridView>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="lblMsg" runat="server"></asp:Label>
<asp:Button ID="btnEmail" runat="server" Text="E-mail" OnClick="btnEmail_Click" CssClass="regbutt" />
&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Button ID="btnExportExce" runat="server" CssClass="clearbutt" Text="Export" Width="65px" OnClick="btnExcelExport_Click" />
</td>
</tr>
</table>

<asp:GridView ID="GridView1" runat="server" Visible="False">
</asp:GridView>

<br />






<asp:ModalPopupExtender ID="mpe" runat="server" PopupControlID="pnlPopup" TargetControlID="btnShow"
CancelControlID="btnShow" BackgroundCssClass="modalBackground">
</asp:ModalPopupExtender>
<asp:Panel ID="pnlPopup" runat="server" CssClass="modalPopup" Style="display: block; height:150PX;">
<div class="header">
<table>
<tr>
<td style="width:99%">&nbsp;<b>Do You Want to Change Status?</b></td>
<td> <asp:Button ID="btnShow" CssClass="canbutt" style="color:darkblue;" runat="server" Text="X" Height="23px"/></td>
</tr>
</table>

</div>
<div class="footer" align="center">
<br />
<asp:DropDownList ID="ddlChangeStatus" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlChangeStatus_SelectedIndexChanged"></asp:DropDownList>
<br />
<br />
<asp:TextBox ID="txtStaIntDate" runat="server" Width="195px"></asp:TextBox>
<asp:CalendarExtender ID="txtStaIntDate_CalendarExtender" runat="server" Enabled="True" TargetControlID="txtStaIntDate">
</asp:CalendarExtender>
&nbsp;

<br />

<asp:Button ID="btnNo" runat="server" CssClass="regbutt" Text="Update" OnClick="btnNo_Click" />
</div>
<asp:Panel ID="Panel11" runat="server" CssClass="regbutt" Style="display: none">


</asp:Panel>
</asp:Panel>

<asp:ModalPopupExtender ID="mpeMail" runat="server" PopupControlID="pnlMail" TargetControlID="HyperLink1"
CancelControlID="Button3" BackgroundCssClass="modalBackground">
</asp:ModalPopupExtender>
<asp:HyperLink ID="HyperLink1" runat="server">.</asp:HyperLink>
<asp:Panel ID="pnlMail" runat="server" CssClass="modalPopup" Style="display: block;width:800px; ">

<table width="750" class="newemp">
<tr>
<td style="width:99%">&nbsp;<b> Send E-mail</b></td>
<td> <asp:Button ID="Button3" CssClass="canbutt" style="color:darkblue;" runat="server" Text="X" Height="23px"/></td>
</tr>
</table>





<table width="750" class="newemp" >
<tr>
<td width="10">TO</td>
<td>
<asp:TextBox ID="txtTo" runat="server" Width="98%"></asp:TextBox>
</td>
</tr>
<tr>
<td>CC</td>
<td>
<asp:TextBox ID="txtCC" runat="server" Width="98%"></asp:TextBox>
</td>
</tr>
<tr>
<td>BCC</td>
<td>
<asp:TextBox ID="txtBcc" runat="server" Width="98%"></asp:TextBox>

</td>
</tr>
<tr>
<td>Subject</td>
<td>
<asp:TextBox ID="txtSub" runat="server" Width="98%"></asp:TextBox>
</td>
</tr>
<tr>
<td>Attachments</td>
<td>
<asp:Panel ID="Panel12" runat="server">
</asp:Panel>
</td>
</tr>
<tr>
<td colspan="2">
<asp:TextBox ID="txtBody" runat="server" Height="350px" TextMode="MultiLine" Width="98.5%" CssClass="txtBox"></asp:TextBox>
<asp:HtmlEditorExtender ID="txtBody_HtmlEditorExtender" DisplaySourceTab="true"
EnableSanitization="false" runat="server" Enabled="True" TargetControlID="txtBody">
</asp:HtmlEditorExtender>
</td>
</tr>
<tr>
<td>
<asp:Button ID="btnSendEmail" runat="server" OnClick="btnSendEmail_Click" Text="Send" CssClass="regbutt" />
</td>
<td>
&nbsp;</td>
</tr>
</table>







</asp:Panel>

</ContentTemplate>

</asp:UpdatePanel>

</asp:Content>
<asp:Content ID="Content2" runat="server" contentplaceholderid="head">
<script type="text/javascript">
{
function SelectAllCheckboxes1(chk) {
$('#<%=gvRef.ClientID%>').find("input:checkbox").each(function () {
if (this != chk) { this.checked = chk.checked; }
});
}
}
</script>
</asp:Content>


<asp:Content ID="Content3" runat="server" contentplaceholderid="contHeader">
<style type="text/css">
.auto-style1
{
width: 53px;
}
.auto-style2
{
width: 87px;
}
.auto-style3
{
width: 68px;
}
</style>
</asp:Content>
 
Serchcunsultatnt.aspx .cs
 protected void gvRef_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{

HyperLink hldownload = new HyperLink();
//LinkButton lbStatus = new LinkButton();
//lbStatus = (LinkButton)e.Row.FindControl("lbStatus");
hldownload = (HyperLink)e.Row.FindControl("hldownload");
HyperLink hlFp = new HyperLink();
hlFp = (HyperLink)e.Row.FindControl("hlFp");

Label lblOpId = new Label();
lblOpId = (Label)e.Row.FindControl("lblOpId") as Label;
LinkButton lbStatus = e.Row.FindControl("lbStatus") as LinkButton;
//lbStatus.Click += new EventHandler(lbStatus_Click);
lbStatus.Command += new CommandEventHandler(lbStatus_Click);
HyperLink hlEdit = new HyperLink();
hlEdit = (HyperLink)e.Row.FindControl("hlEdit");

hlEdit.Visible = false;
lbStatus.Visible = false;
int conId = Convert.ToInt32(lblOpId.Text);
var temp = objCs.GetConsultantDetails(conId);
//if(temp == null)
// hlEdit.Visible = true;

int roleId = objUser.GetUserRoleDetails(Page.User.Identity.Name);
if (objUser.GetUserRoleDetails(Page.User.Identity.Name) < 3)
{
hlEdit.Visible = true;
lbStatus.Visible = true;
}
else if (temp.submitted_by == objUser.GetUserIdByName(Page.User.Identity.Name))
{
hlEdit.Visible = true;
lbStatus.Visible = true;
}
if (temp.resume != null)
hldownload.Enabled = true;
else
hldownload.Visible = false;

if (temp.formatted_resume != null)
hlFp.Visible = true;
else
hlFp.Visible = false;

}
}
  protected void lbStatus_Click(object sender, CommandEventArgs e)
{
LinkButton link = (LinkButton)sender;
GridViewRow grdrow = (GridViewRow)(link.Parent.Parent);
//GridViewRow grdrow = (GridViewRow)((LinkButton)sender).NamingContainer;
LinkButton id = (LinkButton)grdrow.FindControl("lbStatus");
userClass objUser = new userClass();
int? userId = objUser.GetUserIdByName(Page.User.Identity.Name);
pnlPopup.Visible = true;
if (grdrow != null)
{
// Label lblId = (Label)grdrow.FindControl("lblOpId");
// objRequirement.DeAssignedTask(lblId.Text, userId);
int? pStaus = objCs.GetProfileStatusId(Convert.ToInt32(id));
ddlChangeStatus.SelectedValue = pStaus.ToString();
ViewState["ChangeStatus"] = id;
}
mpe.Show();
}
private void LoadGridView()
{
GatewayEntities gt = new GatewayEntities();
IFormatProvider culture = new CultureInfo("en-US", true);
string opName = "0"; int? opCode = 0; string canName = "0"; string emilId = "0"; string mobile = "0"; string notice = "0";
string recName = "0"; string keySkill = "0"; int profStatus = 0; int countryId = 0;
DateTime? postedDate = Convert.ToDateTime("01/01/2000");
int clientId = 0;
DateTime fDate = Convert.ToDateTime("01/01/2000");
DateTime tDate = Convert.ToDateTime("01/01/2000");


if (Request.QueryString.Count == 2 && Session["click"] == null)
{
ddlProfStatus.SelectedIndex = ddlProfStatus.Items.IndexOf(ddlProfStatus.Items.FindByText(Request.QueryString[1].ToString()));
}
else if (Request.QueryString.Count >= 3 && Session["click"] == null)
{
ddlProfStatus.SelectedIndex = ddlProfStatus.Items.IndexOf(ddlProfStatus.Items.FindByText(Request.QueryString[2].ToString()));

}

if (txtOpeningName.Text != string.Empty)
opName = txtOpeningName.Text;
if (txtOpeningCode.Text != string.Empty)
opCode = Convert.ToInt32(txtOpeningCode.Text.Trim());
else
opCode = null;
if (txtCandidateName.Text != string.Empty)
canName = txtCandidateName.Text;
if (txtEmailId.Text != string.Empty)
emilId = txtEmailId.Text;
if (txtMobile.Text != string.Empty)
mobile = txtMobile.Text;
if (txtNotice.Text != string.Empty)
notice = txtNotice.Text;
if (txtRecruiterName.Text != string.Empty)
recName = txtRecruiterName.Text;
if (txtKeySkill.Text.Length > 0)
keySkill = txtKeySkill.Text;
if (ddlProfStatus.SelectedIndex > 0)
profStatus = Convert.ToInt32(ddlProfStatus.SelectedValue);
if (txtPostedDate.Text.Length > 0)
{
DateTime dts = Convert.ToDateTime(txtPostedDate.Text);
postedDate = dts;// (DateTime.ParseExact(dts, "dd/MM/yyyy", culture)).ToShortDateString(); //Convert.ToDateTime(Convert.ToDateTime(txtPostedDate.Text).ToShortDateString());
}
if (ddlCountry.SelectedIndex > 0)
countryId = Convert.ToInt32(ddlCountry.SelectedValue);

//client search from todate
if (ddlClient.SelectedIndex > 0)
clientId = Convert.ToInt32(ddlClient.SelectedValue);
if (txtFroDate.Text.Length > 0)
fDate = Convert.ToDateTime(txtFroDate.Text);
if (txtToDate.Text.Length > 0)
tDate = Convert.ToDateTime(txtToDate.Text);

Session["searchCo"] = null;
Session["searchCo"] = opName.ToString()+","+opCode+","+canName+","+emilId+","+mobile+","+notice+","+recName+","+keySkill+","+profStatus+","+postedDate+","+countryId;


if (ViewState["export"] != null )
{
//FOR EXPORT TO EXCEL
int id = 0;
var exp = gt.usp_search_profiles_client_dates101(opName, opCode == null ? 0 : opCode, canName, emilId, mobile, notice, recName, (opCode == 0 && opCode != null) ? "2" : "0", keySkill, profStatus, countryId,fDate,tDate,clientId).ToList();
var expo = (from c in exp
select new
{
Id = c.id,
CandidateName = c.candidate_name,
opening_name = c.opening_name,
Client = c.Client,
PostedDate = c.submitted_date,
Recruiter = c.submitted_by_name,
KeySkills = c.key_skills,
Exp = c.exp_years,
ContactNumber = c.contact_number,
AvailToJoin = c.notice_period,
CurrentLocation = c.current_location,
CurrentPackage = c.current_package,
OfferedPackage = c.proposed_package,
ConsultCheck = ConsultChecked(c.id),
EmpType =c.EMP_TYPE


}).ToList();
GridView1.AllowPaging = false;


CheckBox chk = (CheckBox)gvRef.HeaderRow.FindControl("chkAll");

if (chk.Checked == true)
GridView1.DataSource = expo.ToList();
else
GridView1.DataSource = expo.Where(d => d.ConsultCheck == "true").ToList();
GridView1.DataBind();
GridView1.Visible = true;

if (GridView1.Rows.Count > 0)
{
lblMsg.Text = "";
}
else
{
lblMsg.Text = "Please Select Profiles and Click again";
return;
}
//FOR EXPORT TO EXCEL

}

else
{
gvRef.DataSource = objCs.GetConsultants(opName, opCode, canName, emilId, mobile, notice, recName, keySkill, profStatus, countryId, fDate, tDate, clientId);
gvRef.DataBind();
///count
int RecordsCount = gt.usp_search_profiles_client_dates101(opName, opCode == null ? 0 : opCode, canName, emilId, mobile, notice, recName, (opCode == 0 && opCode != null) ? "2" : "0", keySkill, profStatus, countryId,fDate,tDate,clientId).ToList().Count();
lblSearchCount.Text = RecordsCount > 0 ? RecordsCount.ToString() + " Records found.." : "No Records found";

}
gt = null;

}
 
 
 
please asap help to me its very aurgent 
 
Thanks & Regards 
Prasad Bhagat
 
 
 
 
 
 
 
 
 
 
 
 

Answers (3)