示例#1
0
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        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());
        }
        try
        {
            //string[] _char = Request.QueryString["_date"].ToString().Split(new char[] { ',' });
            //for (int i = 0; i <= _char.Length - 1; i++)
            //{
            //    if (_char[i].ToString() != "")
            //    {
            //        //Bill_Sys_Calender _bill_Sys_Calender = new Bill_Sys_Calender();
            //        //ArrayList objAdd = new ArrayList();
            //        //objAdd.Add(Request.QueryString["CaseId"].ToString());
            //        //objAdd.Add(_char[i].ToString());
            //        //objAdd.Add(ddlHours.SelectedValue.ToString() + "." + ddlMinutes.SelectedValue.ToString());
            //        //objAdd.Add(txtNotes.Text);
            //        //objAdd.Add(extddlDoctor.Text);
            //        //objAdd.Add(ddlTestNames.SelectedValue);
            //        //objAdd.Add(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
            //        //objAdd.Add(ddlTime.SelectedValue);
            //        //objAdd.Add(ddlEndHours.SelectedValue.ToString() + "." + ddlEndMinutes.SelectedValue.ToString());
            //        //objAdd.Add(ddlEndTime.SelectedValue);
            //        //_bill_Sys_Calender.SaveEvent(objAdd);
            //    }
            //}


            ScheduleReportBO _obj = new ScheduleReportBO();
            _obj.DeleteEvent(txtEventID.Text);

            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ss", "<script language='javascript'>  parent.document.getElementById('divid').style.visibility = 'hidden';  var parentWindow = window.parent;    parentWindow.SelectAndClosePopup();  </script>");

            // Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ss", "<script language='javascript'>  parent.document.getElementById('divid').style.visibility = 'hidden';window.parent.document.location.reload(); parent.document.getElementById('lblMsg').value='Event deleted successfully.';</script>");
        }
        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());
        }
    }
示例#2
0
    private void BindGrid()
    {
        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());
        }
        ScheduleReportBO _objSR = new ScheduleReportBO();

        try
        {
            if (Session["ReportType"].ToString() == "")
            {
                grdScheduleReport.DataSource = _objSR.getScheduleReport(txtDate.Text, txtDate.Text, txtCompanyID.Text, "WEEKLY_REPORT");
            }
            else
            {
                DayOfWeek day  = Convert.ToDateTime(txtDate.Text).DayOfWeek;
                int       days = day - DayOfWeek.Sunday;

                DateTime start = Convert.ToDateTime(txtDate.Text).AddDays(-days);
                DateTime end   = start.AddDays(6);
                grdScheduleReport.DataSource = _objSR.getScheduleReport(start.ToString(), end.ToString(), txtCompanyID.Text, "WEEKLY_REPORT");
            }

            grdScheduleReport.DataBind();
            manipulateColumns();
            make();
        }
        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());
        }
    }
    private void BindGrid()
    {
        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());
        }
        ScheduleReportBO _objSR = new ScheduleReportBO();

        try
        {
            grdScheduleReport.DataSource = _objSR.getCalenderScheduleReport(txtStartDate.Text, txtEndDate.Text, txtCompanyID.Text, extddlDoctor.Text, ddlStatus.SelectedValue);
            grdScheduleReport.DataBind();

            grdForReport.DataSource = _objSR.getCalenderScheduleReport(txtStartDate.Text, txtEndDate.Text, txtCompanyID.Text, extddlDoctor.Text, ddlStatus.SelectedValue);
            grdForReport.DataBind();
            //manipulateColumns();
            //make();
        }
        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());
        }
    }
示例#4
0
    private void BindGrid()
    {
        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());
        }

        ScheduleReportBO _objSR = new ScheduleReportBO();

        try
        {
            DataSet ds;
            ds = null;
            if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true)
            {
                ds = _objSR.getCalenderOutScheduleReport(txtStartDate.Text, txtEndDate.Text, txtCompanyID.Text, "", extddlDoctor.Text, ddlStatus.SelectedValue, extddlOffice.Text, txtSort.Text, txtPatientName.Text, txtCaseNo.Text, txtChartNO.Text);
            }
            else
            {
                if (extddlReferringFacility.Text != "NA")
                {
                    ds = _objSR.getCalenderOutScheduleReport(txtStartDate.Text, txtEndDate.Text, txtCompanyID.Text, extddlReferringFacility.Text, extddlDoctor.Text, ddlStatus.SelectedValue, extddlOffice.Text, txtSort.Text, txtPatientName.Text, txtCaseNo.Text, txtChartNO.Text);
                }
                else
                {
                    ds = _objSR.getCalenderOutScheduleReport(txtStartDate.Text, txtEndDate.Text, txtCompanyID.Text, "", extddlDoctor.Text, ddlStatus.SelectedValue, extddlOffice.Text, txtSort.Text, txtPatientName.Text, txtCaseNo.Text, txtChartNO.Text);
                }
            }

            //  grdScheduleReport.CurrentPageIndex = 0;
            // grdForReport.CurrentPageIndex = 0;

            ///sording date descending at page laod
            #region "sort visite date for page load"
            if (ds != null)
            {
                if (iFlage == 0)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        DataTable sourceTable = (DataTable)ds.Tables[0];
                        DataView  view        = new DataView(sourceTable);

                        view.Sort = "VISIT DESC";
                        grdScheduleReport.DataSource = view;
                        grdForReport.DataSource      = view;
                        grdScheduleReport.DataBind();
                        grdForReport.DataBind();
                    }
                    else
                    {
                        grdScheduleReport.DataSource = ds;
                        grdForReport.DataSource      = ds;
                        grdScheduleReport.DataBind();
                        grdForReport.DataBind();
                    }
                }
                else
                {
                    grdScheduleReport.DataSource = ds;
                    grdForReport.DataSource      = ds;
                    grdScheduleReport.DataBind();
                    grdForReport.DataBind();
                }
            }
            #endregion
            if ((((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_CHART_NO != "1"))
            {
                grdScheduleReport.Columns[1].Visible = false;
                grdForReport.Columns[0].Visible      = false;
            }
            //manipulateColumns();
            //make();
            if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true)
            {
            }
            else
            {
                grdScheduleReport.Columns[0].Visible = false;
            }
        }
        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());
        }
    }