Ejemplo n.º 1
0
        private void BindApplicantsForCurrentProject(DropDownList ddlEventEntity)
        {
            try
            {
                ddlEventEntity.Items.Clear();

                if ((DataUtils.GetInt(hfProjectId.Value) == 0))
                {
                    ddlEventEntity.DataSource = ApplicantData.GetApplicants();
                }
                else
                {
                    ddlEventEntity.DataSource = ProjectMaintenanceData.GetCurrentProjectApplicants(DataUtils.GetInt(hfProjectId.Value));
                }

                ddlEventEntity.DataValueField = "appnameid";
                ddlEventEntity.DataTextField  = "applicantname";
                ddlEventEntity.DataBind();
                ddlEventEntity.Items.Insert(0, new ListItem("Select", "NA"));
            }
            catch (Exception ex)
            {
                LogError(Pagename, "BindApplicantsForCurrentProject", "", ex.Message);
            }
        }
Ejemplo n.º 2
0
        protected void gvApplicant_Sorting(object sender, GridViewSortEventArgs e)
        {
            GridViewSortExpression = e.SortExpression;
            int pageIndex = 0;

            gvApplicant.DataSource = SortDataTable(ApplicantData.GetApplicants(), false);
            gvApplicant.DataBind();
            gvApplicant.PageIndex = pageIndex;
        }
Ejemplo n.º 3
0
 protected void BindApplicants()
 {
     try
     {
         if (Session["SortExp"] == null)
         {
             gvApplicant.DataSource = ApplicantData.GetApplicants();
             gvApplicant.DataBind();
         }
         else
         {
             DataTable table = ApplicantData.GetApplicants();
             DataView  view  = table.DefaultView;
             view.Sort = Session["SortExp"].ToString();
             gvApplicant.DataSource = view.ToTable();
             gvApplicant.DataBind();
         }
     }
     catch (Exception ex)
     {
         lblErrorMsg.Text = ex.Message;
     }
 }