Beispiel #1
0
    protected void BindItems()
    {
        try
        {
            int       Record_Count = 0;
            DataTable dt           = BLL_PB_PortageBill.Get_Lib_Crew_Welfare(UDFLib.ConvertIntegerToNull(ddlVessel.SelectedValue), UDFLib.ConvertDateToNull(ddlEectiveDates.SelectedValue), pagerWf.CurrentPageIndex, pagerWf.PageSize, ref Record_Count);
            UDFLib.ChangeColumnDataType(dt, "Effective_Date", typeof(string));
            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    if (!string.IsNullOrEmpty(dr["Effective_Date"].ToString()))
                    {
                        dr["Effective_Date"] = UDFLib.ConvertUserDateFormat(Convert.ToString(dr["Effective_Date"].ToString()), UDFLib.GetDateFormat());
                    }
                }
            }
            gvWelfare.DataSource = dt;
            gvWelfare.DataBind();

            pagerWf.CountTotalRec = Record_Count.ToString();
            pagerWf.BuildPager();
        }
        catch (Exception ex)
        {
            UDFLib.WriteExceptionLog(ex);
        }
    }