示例#1
0
        protected void FillChildlist()
        {
            DayCarePL.ChildDataProperties        ChildDataProperties = new DayCarePL.ChildDataProperties();
            DayCareBAL.ChildListService          proxyChild          = new DayCareBAL.ChildListService();
            List <DayCarePL.ChildDataProperties> lstChild            = proxyChild.GetAllChildList(new Guid(Session["SchoolId"].ToString()), new Guid(Session["CurrentSchoolYearId"].ToString()));

            ChildDataProperties.ChildDataId = new Guid("00000000-0000-0000-0000-000000000000");
            ChildDataProperties.FullName    = "--Select All--";
            lstChild.Insert(0, ChildDataProperties);

            rcbchildList.DataSource     = lstChild;
            rcbchildList.DataTextField  = "FullName";
            rcbchildList.DataValueField = "ChildDataId";
            rcbchildList.DataBind();
            rcbchildList.EmptyMessage = "---Select---";
        }
 protected void rgChildList_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
 {
     try
     {
         DayCareBAL.ChildListService          proxyChild = new DayCareBAL.ChildListService();
         List <DayCarePL.ChildDataProperties> lstChild   = proxyChild.GetAllChildList(new Guid(Session["SchoolId"].ToString()), new Guid(Session["CurrentSchoolYearId"].ToString()));
         if (lstChild == null)
         {
             lstChild = new List <DayCarePL.ChildDataProperties>();
         }
         rgChildList.DataSource = lstChild;
     }
     catch (Exception ex)
     {
         DayCarePL.Logger.Write(DayCarePL.LogType.EXCEPTION, DayCarePL.ModuleToLog.ChildList, "rgChildFamily_NeedDataSource", ex.Message.ToString(), DayCarePL.Common.GUID_DEFAULT);
     }
 }
示例#3
0
        protected void Page_Init(object sender, EventArgs e)
        {
            string SearchStr = string.Empty;

            try
            {
                if (Session["CurrentSchoolYearId"] == null)
                {
                    Response.Redirect("~/Login.aspx");
                }

                crdata.Report = rpt;
                rpt1          = crdata.ReportDocument;
                DataSet dsReport = new xmlClassWiseStudentAttendTime();
                DataSet ds       = new DataSet();
                if (Session["ChildList"] != null)
                {
                    //rpt.FileName = Server.MapPath("rptFamilyChildListReport.rpt");
                    rpt.FileName = Server.MapPath("rptChildDataListReport.rpt");
                    DayCareBAL.ChildListService proxy = new DayCareBAL.ChildListService();

                    SearchStr += Session["ChildList"].ToString();
                    SearchStr  = Session["ChildList"].ToString().Replace("'00000000-0000-0000-0000-000000000000',", "");
                    CrystalDecisions.CrystalReports.Engine.TextObject titleTextSchool = (CrystalDecisions.CrystalReports.Engine.TextObject)rpt1.ReportDefinition.ReportObjects["Text1"];
                    CrystalDecisions.CrystalReports.Engine.TextObject footer          = (CrystalDecisions.CrystalReports.Engine.TextObject)rpt1.ReportDefinition.ReportObjects["txtfooter"];
                    footer.Text          = Common.GetSchoolWiseAddress(new Guid(Session["SchoolId"].ToString()));
                    titleTextSchool.Text = Session["SchoolName"].ToString().ToUpper();
                    //ds = proxy.GetAccountReceiable(new Guid(Session["CurrentSchoolYearId"].ToString(), new Guid(Request.QueryString["StartDate"].ToString())));
                    ds = proxy.GetChildList(new Guid(Session["SchoolId"].ToString()), new Guid(Session["CurrentSchoolYearId"].ToString()), SearchStr);
                    dsReport.Tables["dtChildDataList"].Merge(ds.Tables[0]);
                    rpt1.SetDataSource(dsReport.Tables["dtChildDataList"]);
                }
                crp.DisplayGroupTree = false;
                crp.ReportSource     = rpt1;
                crp.RefreshReport();
                crp.DataBind();
            }
            catch (Exception ex)
            {
                DayCarePL.Logger.Write(DayCarePL.LogType.EXCEPTION, DayCarePL.ModuleToLog.Ledger, "rptChildDataListReport.rpt Page_Load", ex.Message.ToString(), DayCarePL.Common.GUID_DEFAULT);
            }
        }