Ejemplo n.º 1
0
    private void BindGrid(DateTime date, string flag, int time)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        _bill_Sys_Calender = new Bill_Sys_Calender();
        try
        {
            if (time > 0)
            {
                //BindGrid(Convert.ToDateTime(Session["CURRENT_DATE"].ToString()), Session["CALENDER_STATE"].ToString(), 0);
                grdDisplayEvents.DataSource = _bill_Sys_Calender.GetEventDetailList(date, flag, txtCaseID.Text, txtCompanyid.Text, time);
            }
            else
            {
                grdDisplayEvents.DataSource = _bill_Sys_Calender.GetEventDetailList(date, "Day", txtCaseID.Text, txtCompanyid.Text, time);
            }

            grdDisplayEvents.DataBind();
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }