protected void btnDismissAccount_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());
        }
        ReminderBO objReminder = null;
        DataSet    dsReminder = null;
        DataSet    dsLog = null;
        string     strUserId, strDismissReason = "";
        int        iRecurrence_Id, iReminderID;

        try
        {
            objReminder = new ReminderBO();
            dsReminder  = new DataSet();
            dsLog       = new DataSet();
            strUserId   = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID;

            foreach (DataGridItem dgiDiary_Case in grdaccountreminder.Items)
            {
                CheckBox chkSelect = (CheckBox)dgiDiary_Case.Cells[9].FindControl("chkSelect");
                if (chkSelect.Checked == true)
                {
                    iRecurrence_Id   = Convert.ToInt32(dgiDiary_Case.Cells[0].Text.Trim().ToString());
                    iReminderID      = Convert.ToInt32(dgiDiary_Case.Cells[1].Text.Trim().ToString());
                    strDismissReason = txtDismissAccountReason.Text;
                    dsReminder       = objReminder.DismissReminder(iRecurrence_Id, iReminderID, strDismissReason);
                }
            }
            LoadGrid();
            ScriptManager.RegisterClientScriptBlock(btnDismiss, typeof(Button), "Msg", "alert('Reminder dismissed successfully..!!')", true);
            txtDismissAccountReason.Text = "";
        }
        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);
        }

        finally
        {
            objReminder = null;
            dsReminder  = null;
            dsLog       = null;
        }

        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
    public void LoadGrid()
    {
        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());
        }
        ReminderBO objReminder = null;;
        DataSet    dsReminder  = null;
        string     strUserId   = "";
        string     strCaseID   = "";
        DateTime   dtCurrent_Date;

        try
        {
            objReminder    = new ReminderBO();
            dsReminder     = new DataSet();
            strUserId      = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID;
            dtCurrent_Date = Convert.ToDateTime(System.DateTime.Now.ToShortDateString());
            strCaseID      = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
            dsReminder     = objReminder.LoadReminderDetailsForCaseDeatils(strUserId, dtCurrent_Date, strCaseID);
            if (dsReminder.Tables[0].Rows.Count > 0)
            {
                grdreminder_Case.DataSource = dsReminder.Tables[0];
                grdreminder_Case.DataBind();
                lblDisReasonCase.Visible     = true;
                lblCaseReminder.Visible      = true;
                btnDismissCase.Visible       = true;
                txtDismissCaseReason.Visible = true;
            }
            else
            {
                divCase_reminder.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);
        }

        finally
        {
            objReminder = null;
            dsReminder  = null;
        }

        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Exemplo n.º 3
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());
        }
        ReminderBO objReminder = new ReminderBO();

        try
        {
            //Code change for Defect id:MH01 ---- Start
            Session["ReminderGrid"]          = objReminder.getAssignReminderList(txtUserID.Text);
            grdReminderGrid.CurrentPageIndex = 0;
            grdReminderGrid.DataSource       = (DataSet)Session["ReminderGrid"];
            grdReminderGrid.DataBind();
            //Code change for Defect id:MH01 ---- End
            foreach (DataGridItem grdItem in grdReminderGrid.Items)
            {
                ExtendedDropDownList.ExtendedDropDownList extRStatus = (ExtendedDropDownList.ExtendedDropDownList)grdItem.FindControl("extddlReminderStatus");
                extRStatus.Text = grdItem.Cells[6].Text;
            }
            //Code change for Defect id:MH01 ---- Start
            Session["CreatedReminder"]          = objReminder.getCreatedReminderList(txtUserID.Text);
            grdCreatedReminder.CurrentPageIndex = 0;
            grdCreatedReminder.DataSource       = (DataSet)Session["CreatedReminder"];
            grdCreatedReminder.DataBind();
            //Code change for Defect id:MH01 ---- End
            foreach (DataGridItem grdCItem in grdCreatedReminder.Items)
            {
                ExtendedDropDownList.ExtendedDropDownList extCStatus = (ExtendedDropDownList.ExtendedDropDownList)grdCItem.FindControl("extddlCReminderStatus");
                extCStatus.Text = grdCItem.Cells[6].Text;
            }
        }
        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());
        }
    }
Exemplo n.º 4
0
        private ReminderBO GetSelectedRowDetails()
        {
            var selectedReminder = new ReminderBO();

            if (dgvReminders.SelectedCells.Count > 0)
            {
                selectedReminder.Id       = Convert.ToInt64(dgvReminders.SelectedCells[0].Tag.ToString());
                selectedReminder.Time     = new TimeSpan(Convert.ToDateTime(dgvReminders.SelectedCells[0].Value.ToString()).Hour, Convert.ToDateTime(dgvReminders.SelectedCells[0].Value.ToString()).Minute, Convert.ToDateTime(dgvReminders.SelectedCells[0].Value.ToString()).Second);
                selectedReminder.Reminder = dgvReminders.SelectedCells[1].Value.ToString();
                selectedReminder.Date     = Convert.ToDateTime(dgvReminders.SelectedCells[1].Tag.ToString());
            }
            return(selectedReminder);
        }
Exemplo n.º 5
0
 public Form2(ReminderBO reminder = null)
 {
     InitializeComponent();
     dtpDate.Value = DateTime.Now.Date;
     dtpTime.Value = DateTime.Now;
     if (reminder != null)
     {
         reminderBO = new ReminderBO();
         reminderBO = reminder;
         FillFields();
         btSave.Text = "Update";
     }
 }
Exemplo n.º 6
0
 private void btSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (btSave.Text == "Save")
         {
             if (txtDescription.Text != "")
             {
                 reminderBO      = new ReminderBO();
                 reminderBO.Date = dtpDate.Value;
                 reminderBO.Time = new TimeSpan(Convert.ToDateTime(dtpTime.Value).Hour, Convert.ToDateTime(dtpTime.Value).Minute, Convert.ToDateTime(dtpTime.Value).Second);
                 //reminderBO.Time = new TimeSpan(Convert.ToDateTime(dtpTime.Value).Ticks);
                 reminderBO.Reminder = txtDescription.Text;
                 if (reminderBL.AddReminder(reminderBO) > 0)
                 {
                     MessageBox.Show("Task created");
                     txtDescription.Clear();
                     txtDescription.Focus();
                 }
                 else
                 {
                     MessageBox.Show("Error found !!");
                 }
             }
             else
             {
                 MessageBox.Show("Please enter task description");
             }
         }
         else
         {
             reminderBO.Date     = dtpDate.Value;
             reminderBO.Time     = new TimeSpan(Convert.ToDateTime(dtpTime.Value).Hour, Convert.ToDateTime(dtpTime.Value).Minute, Convert.ToDateTime(dtpTime.Value).Second);
             reminderBO.Reminder = txtDescription.Text;
             if (reminderBL.UpdateReminder(reminderBO) > 0)
             {
                 MessageBox.Show("Task updated");
             }
             else
             {
                 MessageBox.Show("Error found !!");
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 7
0
    protected void btnSave_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());
        }
        string     szreturn    = "";
        ReminderBO _ReminderBO = new ReminderBO();

        try
        {
            szreturn = _ReminderBO.AddReminderType(txtCompanyID.Text, txtremindertype.Text, utxtUserId.Text);
            if (szreturn == "added with success")
            {
                usrMessage.PutMessage("Reminder Type save successfully ...");
                usrMessage.SetMessageType(UserControl_ErrorMessageControl.DisplayType.Type_UserMessage);
                usrMessage.Show();
                grdremindertype.XGridBindSearch();
                ClearControls();
            }

            else if (szreturn == "exists")
            {
                usrMessage.PutMessage("Reminder Type is already Exists ...");
                usrMessage.SetMessageType(UserControl_ErrorMessageControl.DisplayType.Type_UserMessage);
                usrMessage.Show();
                grdremindertype.XGridBindSearch();
                ClearControls();
            }
        }
        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());
        }
    }
Exemplo n.º 8
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());
        }
        ReminderBO objReminder = null;

        objReminder = new ReminderBO();
        try
        {
            for (int i = 0; i < grdremindertype.Rows.Count; i++)
            {
                CheckBox chkDelete       = (CheckBox)grdremindertype.Rows[i].FindControl("chkDelete");
                string   iremindertypeid = grdremindertype.DataKeys[i]["I_REMINDER_TYPE_ID"].ToString();
                if (chkDelete.Checked)
                {
                    objReminder.RemoveReminderType(iremindertypeid, txtCompanyID.Text, utxtUserId.Text);
                }
            }
            usrMessage.PutMessage("Reminder Type Delete successfully ...");
            usrMessage.SetMessageType(UserControl_ErrorMessageControl.DisplayType.Type_UserMessage);
            usrMessage.Show();
            btnSave.Visible   = true;
            btnUpdate.Visible = false;
            grdremindertype.XGridBindSearch();
            ClearControls();
        }

        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());
        }
    }
Exemplo n.º 9
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());
        }
        ReminderBO objReminder = new ReminderBO();

        try
        {
            foreach (DataGridItem dgiReminder in grdCreatedReminder.Items)
            {
                CheckBox chkSelect = (CheckBox)dgiReminder.Cells[6].FindControl("chkSelect");
                if (chkSelect.Checked == true)
                {
                    int intReminderId = Convert.ToInt32(dgiReminder.Cells[0].Text.ToString());
                    objReminder.RemoveAssignReminder(intReminderId);
                }
            }
            BindGrid();
            ScriptManager.RegisterClientScriptBlock(btnUpdate, typeof(Button), "Msg", "alert('Reminder removed successfully...!!')", true);
        }
        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);
        }

        finally
        {
            btnDelete.Style.Add(HtmlTextWriterStyle.Visibility, "hidden");
            objReminder = null;
        }

        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
    public void LoadGrid()
    {
        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());
        }
        ReminderBO objim = null;;
        DataSet    dsim  = null;

        try
        {
            objim = new ReminderBO();
            dsim  = new DataSet();
            dsim  = objim.LoadCheckimDetails(txtCompanyID.Text);
            if (dsim.Tables[0].Rows.Count > 0)
            {
                grdTestInformation.DataSource = null;
                grdTestInformation.DataBind();
                grdTestInformation.DataSource = dsim.Tables[0];
                grdTestInformation.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);
        }
        finally
        {
            objim = null;
            dsim  = null;
        }

        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Exemplo n.º 11
0
    protected void grdReminderGrid_PageIndexChanged(object source, DataGridPageChangedEventArgs 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());
        }
        ReminderBO objReminder = new ReminderBO();

        try
        {
            grdReminderGrid.CurrentPageIndex = e.NewPageIndex;
            grdReminderGrid.DataSource       = (DataSet)Session["ReminderGrid"];
            grdReminderGrid.DataBind();


            foreach (DataGridItem grdItem in grdReminderGrid.Items)
            {
                ExtendedDropDownList.ExtendedDropDownList extRStatus = (ExtendedDropDownList.ExtendedDropDownList)grdItem.FindControl("extddlReminderStatus");
                extRStatus.Text = grdItem.Cells[6].Text;
            }
        }
        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);
        }

        finally
        {
            objReminder = null;
        }

        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Exemplo n.º 12
0
    protected void btnCFilter_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());
        }
        ReminderBO objReminder = new ReminderBO();

        try
        {
            btnDelete.Style.Add(HtmlTextWriterStyle.Visibility, "hidden");
            //Code change for Defect id:MH01 ---- Start
            Session["CreatedReminder"]          = objReminder.getFilterReminderList(extddlCReminderStatus.Text, txtCReminderDate.Text, txtUserID.Text, "");
            grdCreatedReminder.CurrentPageIndex = 0;
            grdCreatedReminder.DataSource       = (DataSet)Session["CreatedReminder"];
            grdCreatedReminder.DataBind();
            //Code change for Defect id:MH01 ---- End
            foreach (DataGridItem grdCItem in grdCreatedReminder.Items)
            {
                ExtendedDropDownList.ExtendedDropDownList extCStatus = (ExtendedDropDownList.ExtendedDropDownList)grdCItem.FindControl("extddlCReminderStatus");
                extCStatus.Text = grdCItem.Cells[6].Text;
            }
            lblMsg.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());
        }
    }
Exemplo n.º 13
0
    public void LoadAssignToListBox()
    {
        ReminderBO _obj         = new ReminderBO();
        string     strCompanyID = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
        DataSet    ds           = new DataSet();

        ds = _obj.GetAddReminderList(strCompanyID);
        lsbAssignTo.DataSource     = ds.Tables[0];
        lsbAssignTo.DataTextField  = "Description";
        lsbAssignTo.DataValueField = "Code";
        lsbAssignTo.DataBind();
        for (int i = 0; i < lsbAssignTo.Items.Count; i++)
        {
            if (lsbAssignTo.Items[i].Text == ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME)
            {
                lsbAssignTo.SelectedIndex = i;
            }
        }
    }
Exemplo n.º 14
0
    public void LoadAssignToListBox()
    {
        ReminderBO reminderBO  = new ReminderBO();
        string     sZCOMPANYID = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
        DataSet    dataSet     = new DataSet();

        dataSet = reminderBO.GetAddReminderList(sZCOMPANYID);
        this.lsbAssignTo.DataSource     = dataSet.Tables[0];
        this.lsbAssignTo.DataTextField  = "Description";
        this.lsbAssignTo.DataValueField = "Code";
        this.lsbAssignTo.DataBind();
        for (int i = 0; i < this.lsbAssignTo.Items.Count; i++)
        {
            if (this.lsbAssignTo.Items[i].Text == ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME)
            {
                this.lsbAssignTo.SelectedIndex = i;
            }
        }
    }
Exemplo n.º 15
0
    protected void btnUpdate_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());
        }
        ReminderBO objReminder = new ReminderBO();

        try
        {
            foreach (DataGridItem grdItem in grdReminderGrid.Items)
            {
                ExtendedDropDownList.ExtendedDropDownList extRStatus = (ExtendedDropDownList.ExtendedDropDownList)grdItem.FindControl("extddlReminderStatus");
                objReminder.UpdateAssignReminder(grdItem.Cells[0].Text, extRStatus.Text);
            }
            BindGrid();
            ScriptManager.RegisterClientScriptBlock(btnUpdate, typeof(Button), "Msg", "alert('Reminder updated successfully...!!')", true);
            //lblMsg.Visible = true;
            //lblMsg.Text = "Reminder updated successfully";
        }
        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());
        }
    }
Exemplo n.º 16
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        ReminderBO reminderBO     = null;
        DataSet    dataSet        = null;
        string     str            = "";
        string     str1           = "";
        string     sZCASEID       = "";
        string     str2           = "";
        DateTime   dateTime       = DateTime.Now.AddYears(2);
        DateTime   dateTime1      = Convert.ToDateTime(dateTime.ToShortDateString());
        int        num            = 0;
        int        num1           = 0;
        int        num2           = 0;
        int        num3           = 0;
        int        num4           = 0;
        int        num5           = 0;
        int        num6           = 0;
        int        num7           = 0;
        int        num8           = 0;
        int        num9           = 0;
        int        num10          = 0;
        int        num11          = 0;
        int        num12          = 0;
        int        num13          = 0;
        int        num14          = 0;
        int        num15          = 0;
        int        num16          = 0;
        int        selectedIndex  = 100;
        int        selectedIndex1 = 100;
        int        num17          = 0;
        int        num18          = 0;
        int        selectedIndex2 = 100;
        int        num19          = 0;
        int        selectedIndex3 = 100;
        int        selectedIndex4 = 100;
        int        selectedIndex5 = 100;
        string     str3           = "RS000000000000000001";

        try
        {
            try
            {
                if (this.txtReminderDesc.Text.Trim().ToString() == "")
                {
                    if (!this.chkRecurrence.Checked)
                    {
                        this.pnlRecurrence.Style.Add(HtmlTextWriterStyle.Display, "none");
                        ScriptManager.RegisterClientScriptBlock(this.btnSave, typeof(Button), "Msg", "ReminderTypeBasedVisible();alert('Note description should not be empty...!!')", true);
                        return;
                    }
                    else
                    {
                        this.pnlRecurrence.Style.Add(HtmlTextWriterStyle.Display, "block");
                        ScriptManager.RegisterClientScriptBlock(this.btnSave, typeof(Button), "Msg", "ReminderTypeBasedVisible();alert('Note description should not be empty...!!')", true);
                        return;
                    }
                }
                else if (this.txtStartDate.Text == "")
                {
                    if (!this.chkRecurrence.Checked)
                    {
                        this.pnlRecurrence.Style.Add(HtmlTextWriterStyle.Display, "none");
                        ScriptManager.RegisterClientScriptBlock(this.btnSave, typeof(Button), "Msg", "ReminderTypeBasedVisible();alert('start date should not be empty...!!')", true);
                        return;
                    }
                    else
                    {
                        this.pnlRecurrence.Style.Add(HtmlTextWriterStyle.Display, "block");
                        ScriptManager.RegisterClientScriptBlock(this.btnSave, typeof(Button), "Msg", "ReminderTypeBasedVisible();alert('start date should not be empty...!!')", true);
                        return;
                    }
                }
                else if (!this.rbtnWeekly.Checked || this.chkWSunday.Checked || this.chkWMonday.Checked || this.chkWTuesday.Checked || this.chkWWednesday.Checked || this.chkWThursday.Checked || this.chkWFriday.Checked || this.chkWSaturday.Checked)
                {
                    str = this.txtReminderDesc.Text.Trim().ToString();
                    str = str.Replace('\n', ' ');
                    str = str.Replace('\r', ' ');
                    if (this.txtUserID.Text != "")
                    {
                        str1 = this.txtUserID.Text.Trim().ToString();
                    }
                    DateTime dateTime2 = Convert.ToDateTime(this.txtStartDate.Text.Trim().ToString());
                    this.lsbAssignTo.SelectedValue.ToString();
                    if (!this.chkRecurrence.Checked)
                    {
                        num2       = 1;
                        dateTime1  = Convert.ToDateTime(this.txtStartDate.Text.Trim().ToString());
                        reminderBO = new ReminderBO();
                        if ((Bill_Sys_CaseObject)this.Session["CASE_OBJECT"] != null)
                        {
                            sZCASEID = ((Bill_Sys_CaseObject)this.Session["CASE_OBJECT"]).SZ_CASE_ID;
                        }
                        if (this.Session["SZ_REMINDER_DOCTOR_ID"] != null)
                        {
                            str2 = this.Session["SZ_REMINDER_DOCTOR_ID"].ToString();
                        }
                        string value       = "";
                        string sZCOMPANYID = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                        foreach (ListItem item in this.lsbAssignTo.Items)
                        {
                            if (!item.Selected)
                            {
                                continue;
                            }
                            value   = item.Value;
                            dataSet = reminderBO.SetReminderDetailsAdd(str, value, str1, str3, dateTime2, dateTime1, num, num1, num2, num3, num4, num5, num6, num7, num8, num9, num10, num11, num12, num13, num14, num15, num16, selectedIndex, selectedIndex1, num17, num18, selectedIndex2, num19, selectedIndex3, selectedIndex4, selectedIndex5, str2, sZCASEID, sZCOMPANYID, "CASE", this.extddlRType.Text, this.extddlRType.Selected_Text.ToString());
                        }
                    }
                    else
                    {
                        num = 1;
                        if (this.rbtnNoEndDate.Checked)
                        {
                            DateTime dateTime3 = DateTime.Now.AddYears(2);
                            dateTime1 = Convert.ToDateTime(dateTime3.ToShortDateString());
                        }
                        else if (this.rbtnEndBy.Checked)
                        {
                            dateTime1 = Convert.ToDateTime(this.txtEndByDate.Text.Trim().ToString());
                        }
                        else if (this.rbtnEndAfter.Checked)
                        {
                            num1 = 4;
                            num2 = Convert.ToInt32(this.txtEndAfter.Text.Trim().ToString());
                            DateTime dateTime4 = Convert.ToDateTime(this.txtStartDate.Text.Trim().ToString());
                            dateTime1 = dateTime4.AddDays(Convert.ToDouble(num2));
                        }
                        if (!(dateTime2.ToString() != "") || !(dateTime1.ToString() != "") || !(dateTime2 > dateTime1))
                        {
                            if (this.rbtnDaily.Checked)
                            {
                                num1 = 0;
                                if (!this.rbtnDEvery.Checked)
                                {
                                    num5 = 1;
                                    num3 = 1;
                                }
                                else
                                {
                                    num4 = Convert.ToInt32(this.txtDDays.Text.Trim().ToString());
                                    num3 = 0;
                                }
                            }
                            else if (this.rbtnWeekly.Checked)
                            {
                                num1 = 1;
                                num6 = Convert.ToInt32(this.txtWRecur.Text.Trim().ToString());
                                if (this.chkWSunday.Checked)
                                {
                                    num7 = 1;
                                }
                                if (this.chkWMonday.Checked)
                                {
                                    num8 = 1;
                                }
                                if (this.chkWTuesday.Checked)
                                {
                                    num9 = 1;
                                }
                                if (this.chkWWednesday.Checked)
                                {
                                    num10 = 1;
                                }
                                if (this.chkWThursday.Checked)
                                {
                                    num11 = 1;
                                }
                                if (this.chkWFriday.Checked)
                                {
                                    num12 = 1;
                                }
                                if (this.chkWSaturday.Checked)
                                {
                                    num13 = 1;
                                }
                            }
                            else if (this.rbtnMonthly.Checked)
                            {
                                num1 = 2;
                                if (!this.rbtnMDay.Checked)
                                {
                                    num14          = 1;
                                    selectedIndex  = this.drpMTerm.SelectedIndex;
                                    selectedIndex1 = this.drpMDayRecur.SelectedIndex;
                                    num17          = Convert.ToInt32(this.txtMEveryMonths.Text.Trim().ToString());
                                }
                                else
                                {
                                    num14 = 0;
                                    num15 = Convert.ToInt32(this.txtMDay.Text.Trim().ToString());
                                    num16 = Convert.ToInt32(this.txtMMonths.Text.Trim().ToString());
                                }
                            }
                            else if (this.rbtnYearly.Checked)
                            {
                                num1 = 3;
                                if (!this.rbtnYEvery.Checked)
                                {
                                    num18          = 1;
                                    selectedIndex3 = this.drpYTerm.SelectedIndex;
                                    selectedIndex4 = this.drpYDayRecur.SelectedIndex;
                                    selectedIndex5 = this.drpYMonthRecur.SelectedIndex;
                                }
                                else
                                {
                                    num18          = 0;
                                    selectedIndex2 = this.drpYMonth.SelectedIndex;
                                    num19          = Convert.ToInt32(this.txtYDay.Text.Trim().ToString());
                                }
                            }
                            reminderBO = new ReminderBO();
                            if ((Bill_Sys_CaseObject)this.Session["CASE_OBJECT"] != null)
                            {
                                sZCASEID = ((Bill_Sys_CaseObject)this.Session["CASE_OBJECT"]).SZ_CASE_ID;
                            }
                            if (this.Session["SZ_REMINDER_DOCTOR_ID"] != null)
                            {
                                str2 = this.Session["SZ_REMINDER_DOCTOR_ID"].ToString();
                            }
                            string value1       = "";
                            string sZCOMPANYID1 = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                            foreach (ListItem listItem in this.lsbAssignTo.Items)
                            {
                                if (!listItem.Selected)
                                {
                                    continue;
                                }
                                value1  = listItem.Value;
                                dataSet = reminderBO.SetReminderDetailsAdd(str, value1, str1, str3, dateTime2, dateTime1, num, num1, num2, num3, num4, num5, num6, num7, num8, num9, num10, num11, num12, num13, num14, num15, num16, selectedIndex, selectedIndex1, num17, num18, selectedIndex2, num19, selectedIndex3, selectedIndex4, selectedIndex5, str2, sZCASEID, sZCOMPANYID1, "CASE", this.extddlRType.Text, this.extddlRType.Selected_Text.ToString());
                            }
                        }
                        else
                        {
                            this.pnlRecurrence.Style.Add(HtmlTextWriterStyle.Display, "block");
                            ScriptManager.RegisterClientScriptBlock(this.btnSave, typeof(Button), "Msg", "ReminderTypeBasedVisible();alert('Reminder start date should not be greated than reminder end date...!!')", true);
                            return;
                        }
                    }
                    if (dataSet.Tables.Count <= 0)
                    {
                        ScriptManager.RegisterClientScriptBlock(this.btnSave, typeof(Button), "Msg", "ClearValues();alert('Failed to add reminder details..!!')", true);
                    }
                    else if (dataSet.Tables[0].Rows.Count <= 0)
                    {
                        ScriptManager.RegisterClientScriptBlock(this.btnSave, typeof(Button), "Msg", "ClearValues();alert('Failed to add reminder details..!!')", true);
                    }
                    else if (dataSet.Tables[0].Rows[0]["result"].ToString() == "1")
                    {
                        ScriptManager.RegisterClientScriptBlock(this.btnSave, typeof(Button), "Msg", "ClearValues();alert('Reminder details added successfully...!!')", true);
                    }
                }
                else
                {
                    this.pnlRecurrence.Style.Add(HtmlTextWriterStyle.Display, "block");
                    ScriptManager.RegisterClientScriptBlock(this.btnSave, typeof(Button), "Msg", "ReminderTypeBasedVisible();alert('Plase select week days in weekly recurrence...!!')", true);
                    return;
                }
            }
            catch (Exception exception)
            {
            }
        }
        finally
        {
            reminderBO = null;
            dataSet    = null;
        }
    }
Exemplo n.º 17
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        ReminderBO objReminder     = null;
        DataSet    dsReminder      = null;
        string     str_description = "";
        string     str_assigned_to = "";
        string     str_assigned_by = "";
        string     str_case_id     = "";
        string     str_docotr_id   = "";
        DateTime   dt_start_date;
        DateTime   dt_end_date            = Convert.ToDateTime(System.DateTime.Now.AddYears(2).ToShortDateString());
        int        i_is_recurrence        = 0;
        int        i_recurrence_type      = 0;
        int        i_occurrence_end_count = 0;
        int        i_day_option           = 0;
        int        i_d_day_count          = 0;
        int        i_d_every_weekday      = 0;
        int        i_w_recur_week_count   = 0;
        int        i_w_sunday             = 0;
        int        i_w_monday             = 0;
        int        i_w_tuesday            = 0;
        int        i_w_wednesday          = 0;
        int        i_w_thursday           = 0;
        int        i_w_friday             = 0;
        int        i_w_saturday           = 0;
        int        i_month_option         = 0;
        int        i_m_day               = 0;
        int        i_m_month_count       = 0;
        int        i_m_term              = 100;
        int        i_m_term_week         = 100;
        int        i_m_every_month_count = 0;
        int        i_year_option         = 0;
        int        i_y_month             = 100;
        int        i_y_day               = 0;
        int        i_y_term              = 100;
        int        i_y_term_week         = 100;
        int        i_y_every_month_count = 100;
        string     strReminderStatus     = "RS000000000000000001";


        try
        {
            //_saveOperation.WebPage = this.Page;
            //_saveOperation.Xml_File = "AddReminderXML.xml";
            //_saveOperation.SaveMethod();
            //ClearControl();

            if (txtReminderDesc.Text.Trim().ToString() == "")
            {
                if (chkRecurrence.Checked == true)
                {
                    pnlRecurrence.Style.Add(HtmlTextWriterStyle.Display, "block");
                    ScriptManager.RegisterClientScriptBlock(btnSave, typeof(Button), "Msg", "ReminderTypeBasedVisible();alert('Note description should not be empty...!!')", true);
                    return;
                }
                else
                {
                    pnlRecurrence.Style.Add(HtmlTextWriterStyle.Display, "none");
                    ScriptManager.RegisterClientScriptBlock(btnSave, typeof(Button), "Msg", "ReminderTypeBasedVisible();alert('Note description should not be empty...!!')", true);
                    return;
                }
            }

            if (txtStartDate.Text == "")
            {
                if (chkRecurrence.Checked == true)
                {
                    pnlRecurrence.Style.Add(HtmlTextWriterStyle.Display, "block");
                    ScriptManager.RegisterClientScriptBlock(btnSave, typeof(Button), "Msg", "ReminderTypeBasedVisible();alert('start date should not be empty...!!')", true);
                    return;
                }
                else
                {
                    pnlRecurrence.Style.Add(HtmlTextWriterStyle.Display, "none");
                    ScriptManager.RegisterClientScriptBlock(btnSave, typeof(Button), "Msg", "ReminderTypeBasedVisible();alert('start date should not be empty...!!')", true);
                    return;
                }
            }



            if (rbtnWeekly.Checked == true)
            {
                if (chkWSunday.Checked == false && chkWMonday.Checked == false && chkWTuesday.Checked == false && chkWWednesday.Checked == false && chkWThursday.Checked == false && chkWFriday.Checked == false && chkWSaturday.Checked == false)
                {
                    pnlRecurrence.Style.Add(HtmlTextWriterStyle.Display, "block");
                    ScriptManager.RegisterClientScriptBlock(btnSave, typeof(Button), "Msg", "ReminderTypeBasedVisible();alert('Plase select week days in weekly recurrence...!!')", true);
                    return;
                }
            }

            str_description = txtReminderDesc.Text.Trim().ToString();

            str_description = str_description.Replace('\n', ' ');
            str_description = str_description.Replace('\r', ' ');

            if (txtUserID.Text != "")
            {
                str_assigned_by = txtUserID.Text.Trim().ToString();
            }
            dt_start_date = Convert.ToDateTime(txtStartDate.Text.Trim().ToString());

            str_assigned_to = lsbAssignTo.SelectedValue.ToString();

            if (chkRecurrence.Checked == true)
            {
                i_is_recurrence = 1;
                if (rbtnNoEndDate.Checked == true)
                {
                    dt_end_date = Convert.ToDateTime(System.DateTime.Now.AddYears(2).ToShortDateString());
                }
                else if (rbtnEndBy.Checked == true)
                {
                    dt_end_date = Convert.ToDateTime(txtEndByDate.Text.Trim().ToString());
                }
                else if (rbtnEndAfter.Checked == true)
                {
                    i_recurrence_type = 4;

                    i_occurrence_end_count = Convert.ToInt32(txtEndAfter.Text.Trim().ToString());
                    dt_end_date            = Convert.ToDateTime(txtStartDate.Text.Trim().ToString()).AddDays(Convert.ToDouble(i_occurrence_end_count));
                }

                if (dt_start_date.ToString() != "" && dt_end_date.ToString() != "")
                {
                    if (dt_start_date > dt_end_date)
                    {
                        pnlRecurrence.Style.Add(HtmlTextWriterStyle.Display, "block");
                        ScriptManager.RegisterClientScriptBlock(btnSave, typeof(Button), "Msg", "ReminderTypeBasedVisible();alert('Reminder start date should not be greated than reminder end date...!!')", true);
                        return;
                    }
                }

                if (rbtnDaily.Checked == true)
                {
                    i_recurrence_type = 0;

                    if (rbtnDEvery.Checked == true)
                    {
                        i_d_day_count = Convert.ToInt32(txtDDays.Text.Trim().ToString());
                        i_day_option  = 0;
                    }
                    else
                    {
                        i_d_every_weekday = 1;
                        i_day_option      = 1;
                    }
                }
                else if (rbtnWeekly.Checked == true)
                {
                    i_recurrence_type = 1;

                    i_w_recur_week_count = Convert.ToInt32(txtWRecur.Text.Trim().ToString());
                    if (chkWSunday.Checked == true)
                    {
                        i_w_sunday = 1;
                    }
                    if (chkWMonday.Checked == true)
                    {
                        i_w_monday = 1;
                    }
                    if (chkWTuesday.Checked == true)
                    {
                        i_w_tuesday = 1;
                    }
                    if (chkWWednesday.Checked == true)
                    {
                        i_w_wednesday = 1;
                    }
                    if (chkWThursday.Checked == true)
                    {
                        i_w_thursday = 1;
                    }
                    if (chkWFriday.Checked == true)
                    {
                        i_w_friday = 1;
                    }
                    if (chkWSaturday.Checked == true)
                    {
                        i_w_saturday = 1;
                    }
                }
                else if (rbtnMonthly.Checked == true)
                {
                    i_recurrence_type = 2;

                    if (rbtnMDay.Checked == true)
                    {
                        i_month_option  = 0;
                        i_m_day         = Convert.ToInt32(txtMDay.Text.Trim().ToString());
                        i_m_month_count = Convert.ToInt32(txtMMonths.Text.Trim().ToString());
                    }
                    else
                    {
                        i_month_option        = 1;
                        i_m_term              = drpMTerm.SelectedIndex;
                        i_m_term_week         = drpMDayRecur.SelectedIndex;
                        i_m_every_month_count = Convert.ToInt32(txtMEveryMonths.Text.Trim().ToString());
                    }
                }
                else if (rbtnYearly.Checked == true)
                {
                    i_recurrence_type = 3;

                    if (rbtnYEvery.Checked == true)
                    {
                        i_year_option = 0;
                        i_y_month     = drpYMonth.SelectedIndex;
                        i_y_day       = Convert.ToInt32(txtYDay.Text.Trim().ToString());
                    }
                    else
                    {
                        i_year_option         = 1;
                        i_y_term              = drpYTerm.SelectedIndex;
                        i_y_term_week         = drpYDayRecur.SelectedIndex;
                        i_y_every_month_count = drpYMonthRecur.SelectedIndex;
                    }
                }



                objReminder = new ReminderBO();
                if (((Bill_Sys_CaseObject)Session["CASE_OBJECT"]) != null)
                {
                    str_case_id = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
                }
                if (Session["SZ_REMINDER_DOCTOR_ID"] != null)
                {
                    str_docotr_id = Session["SZ_REMINDER_DOCTOR_ID"].ToString();
                }
                string Assign_To     = "";
                string strCompany_id = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;


                foreach (ListItem listitem in lsbAssignTo.Items)
                {
                    if (listitem.Selected)
                    {
                        Assign_To  = listitem.Value;
                        dsReminder = objReminder.SetReminderDetailsAdd(str_description, Assign_To, str_assigned_by, strReminderStatus, dt_start_date, dt_end_date, i_is_recurrence, i_recurrence_type, i_occurrence_end_count, i_day_option, i_d_day_count, i_d_every_weekday, i_w_recur_week_count, i_w_sunday, i_w_monday, i_w_tuesday, i_w_wednesday, i_w_thursday, i_w_friday, i_w_saturday, i_month_option, i_m_day, i_m_month_count, i_m_term, i_m_term_week, i_m_every_month_count, i_year_option, i_y_month, i_y_day, i_y_term, i_y_term_week, i_y_every_month_count, str_docotr_id, str_case_id, strCompany_id, "LOGIN", extddlRType.Text, extddlRType.Selected_Text.ToString());
                    }
                }
            }
            else
            {
                i_occurrence_end_count = 1;
                dt_end_date            = Convert.ToDateTime(txtStartDate.Text.Trim().ToString());

                objReminder = new ReminderBO();
                if (((Bill_Sys_CaseObject)Session["CASE_OBJECT"]) != null)
                {
                    str_case_id = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
                }

                if (Session["SZ_REMINDER_DOCTOR_ID"] != null)
                {
                    str_docotr_id = Session["SZ_REMINDER_DOCTOR_ID"].ToString();
                }
                string AssignTo     = "";
                string strCompanyID = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;

                foreach (ListItem listitem in lsbAssignTo.Items)
                {
                    if (listitem.Selected)
                    {
                        AssignTo   = listitem.Value;
                        dsReminder = objReminder.SetReminderDetailsAdd(str_description, AssignTo, str_assigned_by, strReminderStatus, dt_start_date, dt_end_date, i_is_recurrence, i_recurrence_type, i_occurrence_end_count, i_day_option, i_d_day_count, i_d_every_weekday, i_w_recur_week_count, i_w_sunday, i_w_monday, i_w_tuesday, i_w_wednesday, i_w_thursday, i_w_friday, i_w_saturday, i_month_option, i_m_day, i_m_month_count, i_m_term, i_m_term_week, i_m_every_month_count, i_year_option, i_y_month, i_y_day, i_y_term, i_y_term_week, i_y_every_month_count, str_docotr_id, str_case_id, strCompanyID, "LOGIN", extddlRType.Text, extddlRType.Selected_Text.ToString());
                    }
                }
            }
            if (dsReminder.Tables.Count > 0)
            {
                if (dsReminder.Tables[0].Rows.Count > 0)
                {
                    if (dsReminder.Tables[0].Rows[0]["result"].ToString() == "1")
                    {
                        ScriptManager.RegisterClientScriptBlock(btnSave, typeof(Button), "Msg", "ClearValues();alert('Reminder details added successfully...!!')", true);
                    }
                }
                else
                {
                    ScriptManager.RegisterClientScriptBlock(btnSave, typeof(Button), "Msg", "ClearValues();alert('Failed to add reminder details..!!')", true);
                }
            }
            else
            {
                ScriptManager.RegisterClientScriptBlock(btnSave, typeof(Button), "Msg", "ClearValues();alert('Failed to add reminder details..!!')", true);
            }
        }
        catch (Exception ex)
        {
        }
        finally
        {
            objReminder = null;
            dsReminder  = null;
        }
    }
Exemplo n.º 18
0
    protected void btnSave_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());
        }
        this._saveOperation = new SaveOperation();
        try
        {
            this._saveOperation.WebPage  = this.Page;
            this._saveOperation.Xml_File = "notes.xml";
            if (this.chkReminderPopup.Checked)
            {
                this.extddlNType.Text = "NTY0004";
            }
            this._saveOperation.SaveMethod();
            this.grdNotes.XGridBindSearch();
            this.extddlFilter.Selected_Text = "GENERAL";
            if (this.extddlNType.Text == "NTY0004" && this.txtNoteDesc.Text != "")
            {
                try
                {
                    ReminderBO reminderBO = new ReminderBO();
                    DataSet    dataSet    = null;
                    string     str        = "";
                    string     str1       = "";
                    string     str2       = "";
                    string     sZCASEID   = "";
                    string     str3       = "";
                    DateTime   dateTime   = DateTime.Now.AddYears(2);
                    DateTime   dateTime1  = Convert.ToDateTime(dateTime.ToShortDateString());
                    int        num        = 0;
                    int        num1       = 0;
                    int        num2       = 0;
                    int        num3       = 0;
                    int        num4       = 0;
                    int        num5       = 0;
                    int        num6       = 0;
                    int        num7       = 0;
                    int        num8       = 0;
                    int        num9       = 0;
                    int        num10      = 0;
                    int        num11      = 0;
                    int        num12      = 0;
                    int        num13      = 0;
                    int        num14      = 0;
                    int        num15      = 0;
                    int        num16      = 0;
                    int        num17      = 100;
                    int        num18      = 100;
                    int        num19      = 0;
                    int        num20      = 0;
                    int        num21      = 100;
                    int        num22      = 0;
                    int        num23      = 100;
                    int        num24      = 100;
                    int        num25      = 100;
                    string     str4       = "RS000000000000000001";
                    this.Session["ReminiderNotes"] = "";
                    str = this.txtNoteDesc.Text.Trim().ToString();
                    str = str.Replace('\n', ' ');
                    str = str.Replace('\r', ' ');
                    if (this.txtUserID.Text != "")
                    {
                        str2 = this.txtUserID.Text.Trim().ToString();
                    }
                    DateTime date = DateTime.Now.Date;
                    str1 = this.txtUserID.Text.Trim().ToString();
                    num2 = 1;
                    if ((Bill_Sys_CaseObject)this.Session["CASE_OBJECT"] != null)
                    {
                        sZCASEID = ((Bill_Sys_CaseObject)this.Session["CASE_OBJECT"]).SZ_CASE_ID;
                    }
                    string text = this.txtCompanyID.Text;
                    dataSet = reminderBO.SetReminderDetailsForCase(str, str1, str2, str4, date, dateTime1, num, num1, num2, num3, num4, num5, num6, num7, num8, num9, num10, num11, num12, num13, num14, num15, num16, num17, num18, num19, num20, num21, num22, num23, num24, num25, str3, sZCASEID, text, "CASE", "", "");
                    if (dataSet.Tables.Count <= 0)
                    {
                        ScriptManager.RegisterClientScriptBlock(this.btnSave, typeof(Button), "Msg", "ClearValues();alert('Failed to add reminder details..!!')", true);
                    }
                    else if (dataSet.Tables[0].Rows.Count <= 0)
                    {
                        ScriptManager.RegisterClientScriptBlock(this.btnSave, typeof(Button), "Msg", "ClearValues();alert('Failed to add reminder details..!!')", true);
                    }
                    else if (dataSet.Tables[0].Rows[0]["result"].ToString() == "1")
                    {
                        this.Session["ReminiderNotes"] = true;
                        ScriptManager.RegisterClientScriptBlock(this.btnSave, typeof(Button), "Msg", "ClearValues();alert('Reminder details added successfully...!!')", true);
                    }
                }
                catch (Exception exception)
                {
                    exception.ToString();
                }
            }
            this.ClearControl();
        }
        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());
        }
    }
Exemplo n.º 19
0
    public void LoadGrid()
    {
        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());
        }
        ReminderBO objReminder = null;;
        DataSet    dsReminder  = null;
        string     strUserId   = "";
        DateTime   dtCurrent_Date;

        try
        {
            objReminder    = new ReminderBO();
            dsReminder     = new DataSet();
            strUserId      = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID;
            dtCurrent_Date = Convert.ToDateTime(System.DateTime.Now.ToShortDateString());
            dsReminder     = objReminder.LoadReminderDetails(strUserId, dtCurrent_Date);
            if (dsReminder.Tables[0].Rows.Count > 0)
            {
                lblREsult.Visible      = false;
                grdReminder.DataSource = null;
                grdReminder.DataBind();

                grdReminder.DataSource = dsReminder.Tables[0];
                grdReminder.DataBind();
                //Session["dtReminderView"] = dsReminder.Tables[0].DefaultView;
                lblDisReason.Visible      = true;
                lblDoctorReminder.Visible = true;
                btnDismiss.Visible        = true;
                txtDismissReason.Visible  = true;
            }
            else
            {
                //Page.RegisterStartupScript("ss", "<script language='javascript'> CloseCheckoutReminderPopup();</script>");
                divReminder.Visible = false;
                //this.frmReminder.Dispose();
                //this.frmReminder.Style.Add("Visibility", "Hidden");
            }

            if (dsReminder.Tables[1].Rows.Count > 0)
            {
                lblCaseResult.Visible       = false;
                grdreminder_Case.DataSource = null;
                grdreminder_Case.DataBind();

                grdreminder_Case.DataSource = dsReminder.Tables[1];
                grdreminder_Case.DataBind();
                lblDisReasonCase.Visible     = true;
                lblCaseReminder.Visible      = true;
                btnDismissCase.Visible       = true;
                txtDismissCaseReason.Visible = true;
            }
            else
            {
                //Page.RegisterStartupScript("ss", "<script language='javascript'> CloseCheckoutReminderPopup();</script>");
                divCase_reminder.Visible = false;
                //this.frmReminder.Dispose();
                //this.frmReminder.Style.Add("Visibility", "Hidden");
            }
        }
        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);
        }

        finally
        {
            objReminder = null;
            dsReminder  = null;
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Exemplo n.º 20
0
        public long AddReminder(ReminderBO reminderBO)
        {
            var query = "INSERT INTO tblReminder([Time],[Reminder],[Date]) VALUES ('" + reminderBO.Time + "','" + reminderBO.Reminder + "','" + reminderBO.Date.Date + "')";

            return(reminderDB.UpsertDeleteReminder(query));
        }
Exemplo n.º 21
0
        public long UpdateReminder(ReminderBO reminderBO)
        {
            var query = "UPDATE tblReminder SET [Time]='" + reminderBO.Time + "', [Reminder]='" + reminderBO.Reminder + "', [Date]='" + reminderBO.Date.Date + "' WHERE [Id]=" + reminderBO.Id;

            return(reminderDB.UpsertDeleteReminder(query));
        }
Exemplo n.º 22
0
    protected void btnSave_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());
        }

        _saveOperation = new SaveOperation();
        try
        {
            _saveOperation.WebPage  = this.Page;
            _saveOperation.Xml_File = "notes.xml";

            //extddlNoteType.Text = extddlNType.Text;

            if (chkReminderPopup.Checked == true)
            {
                extddlNType.Text = "NTY0004";
            }

            _saveOperation.SaveMethod();
            grdNotes.XGridBindSearch();

            extddlFilter.Selected_Text = "GENERAL";
            if (extddlNType.Text == "NTY0004" && txtNoteDesc.Text != "")
            {
                try
                {
                    Reminders.ReminderBO objReminder = new ReminderBO();
                    DataSet  dsReminder      = null;
                    string   str_description = "";
                    string   str_assigned_to = "";
                    string   str_assigned_by = "";
                    string   str_case_id     = "";
                    string   str_docotr_id   = "";
                    DateTime dt_start_date;
                    DateTime dt_end_date            = Convert.ToDateTime(System.DateTime.Now.AddYears(2).ToShortDateString());
                    int      i_is_recurrence        = 0;
                    int      i_recurrence_type      = 0;
                    int      i_occurrence_end_count = 0;
                    int      i_day_option           = 0;
                    int      i_d_day_count          = 0;
                    int      i_d_every_weekday      = 0;
                    int      i_w_recur_week_count   = 0;
                    int      i_w_sunday             = 0;
                    int      i_w_monday             = 0;
                    int      i_w_tuesday            = 0;
                    int      i_w_wednesday          = 0;
                    int      i_w_thursday           = 0;
                    int      i_w_friday             = 0;
                    int      i_w_saturday           = 0;
                    int      i_month_option         = 0;
                    int      i_m_day               = 0;
                    int      i_m_month_count       = 0;
                    int      i_m_term              = 100;
                    int      i_m_term_week         = 100;
                    int      i_m_every_month_count = 0;
                    int      i_year_option         = 0;
                    int      i_y_month             = 100;
                    int      i_y_day               = 0;
                    int      i_y_term              = 100;
                    int      i_y_term_week         = 100;
                    int      i_y_every_month_count = 100;
                    string   strReminderStatus     = "RS000000000000000001";

                    Session["ReminiderNotes"] = "";

                    str_description = txtNoteDesc.Text.Trim().ToString();
                    str_description = str_description.Replace('\n', ' ');
                    str_description = str_description.Replace('\r', ' ');

                    if (txtUserID.Text != "")
                    {
                        str_assigned_by = txtUserID.Text.Trim().ToString();
                    }
                    dt_start_date = System.DateTime.Now.Date;

                    str_assigned_to = txtUserID.Text.Trim().ToString();

                    i_occurrence_end_count = 1;



                    if (((Bill_Sys_CaseObject)Session["CASE_OBJECT"]) != null)
                    {
                        str_case_id = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
                    }
                    string strCompanyID = txtCompanyID.Text;


                    dsReminder = objReminder.SetReminderDetailsForCase(str_description, str_assigned_to, str_assigned_by, strReminderStatus, dt_start_date, dt_end_date, i_is_recurrence, i_recurrence_type, i_occurrence_end_count, i_day_option, i_d_day_count, i_d_every_weekday, i_w_recur_week_count, i_w_sunday, i_w_monday, i_w_tuesday, i_w_wednesday, i_w_thursday, i_w_friday, i_w_saturday, i_month_option, i_m_day, i_m_month_count, i_m_term, i_m_term_week, i_m_every_month_count, i_year_option, i_y_month, i_y_day, i_y_term, i_y_term_week, i_y_every_month_count, str_docotr_id, str_case_id, strCompanyID, "CASE", "", "");
                    if (dsReminder.Tables.Count > 0)
                    {
                        if (dsReminder.Tables[0].Rows.Count > 0)
                        {
                            if (dsReminder.Tables[0].Rows[0]["result"].ToString() == "1")
                            {
                                Session["ReminiderNotes"] = true;
                                ScriptManager.RegisterClientScriptBlock(btnSave, typeof(Button), "Msg", "ClearValues();alert('Reminder details added successfully...!!')", true);
                            }
                        }
                        else
                        {
                            ScriptManager.RegisterClientScriptBlock(btnSave, typeof(Button), "Msg", "ClearValues();alert('Failed to add reminder details..!!')", true);
                        }
                    }
                    else
                    {
                        ScriptManager.RegisterClientScriptBlock(btnSave, typeof(Button), "Msg", "ClearValues();alert('Failed to add reminder details..!!')", true);
                    }
                }
                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);
                }
            }
            ClearControl();
        }
        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());
        }
    }
Exemplo n.º 23
0
    protected void Page_Load(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());
        }
        int        i;
        bool       flag;
        HttpCookie loggedout = new HttpCookie("loggedout", "0");

        loggedout.Expires = DateTime.Now.AddYears(1);
        Response.Cookies.Add(loggedout);

        Bill_Sys_PatientList.log.Debug("Search case page_load");
        this.utxtUserId.Text = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ID;
        this.RegisterClientScriptBlock("ClientScript", "<script language=JavaScript> function autoComplete (field, select, property, forcematch) {var found = false;for (var i = 0; i < select.options.length; i++) {if (select.options[i][property].toUpperCase().indexOf(field.value.toUpperCase()) == 0) {\t\tfound=true; break;}}if (found) { select.selectedIndex = i; }else {select.selectedIndex = -1;}if (field.createTextRange) {if (forcematch && !found) {field.value=field.value.substring(0,field.value.length-1); return;}var cursorKeys ='8;46;37;38;39;40;33;34;35;36;45;';if (cursorKeys.indexOf(event.keyCode+';') == -1) {var r1 = field.createTextRange();var oldValue = r1.text;var newValue = found ? select.options[i][property] : oldValue;if (newValue != field.value) {field.value = newValue;var rNew = field.createTextRange();rNew.moveStart('character', oldValue.length) ;rNew.select();}}}} </script>");
        this.ajAutoIns.ContextKey  = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
        this.ajAutoName.ContextKey = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
        this.btnSoftDelete.Attributes.Add("onclick", "return Validate()");
        this.btnExportToExcel.Attributes.Add("onclick", "return ValidateExportBill()");
        if (!base.IsPostBack)
        {
            try
            {
                DataSet dataSet = new DataSet();
                dataSet = (new Bill_Sys_ProcedureCode_BO()).Get_Sys_Key("SS00041", ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                if (dataSet.Tables.Count > 0 && dataSet.Tables[0].Rows.Count > 0)
                {
                    if (dataSet.Tables[0].Rows[0][0].ToString() != "0")
                    {
                        this.Session["SendPatientToDoctor"] = true;
                    }
                    else
                    {
                        this.Session["SendPatientToDoctor"] = false;
                    }
                }
            }
            catch (Exception exception)
            {
                this.Session["SendPatientToDoctor"] = false;
            }
        }
        StringBuilder stringBuilder  = new StringBuilder();
        StringBuilder stringBuilder1 = new StringBuilder();

        stringBuilder.Append("Case #,");
        if (!((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY)
        {
            stringBuilder1.Append("SZ_CASE_NO,");
            this.grdPatientList.Columns[33].Visible = false;
        }
        else
        {
            stringBuilder1.Append("SZ_RECASE_NO,");
            this.grdPatientList.Columns[25].Visible = true;
            this.grdPatientList.Columns[33].Visible = true;
        }
        if (((Bill_Sys_SystemObject)this.Session["SYSTEM_OBJECT"]).SZ_CHART_NO == "1")
        {
            stringBuilder.Append("Chart No,");
            stringBuilder1.Append("SZ_CHART_NO,");
        }
        if (((Bill_Sys_SystemObject)this.Session["SYSTEM_OBJECT"]).SZ_LOCATION == "1")
        {
            this.extddlLocation.Visible = true;
            this.lblLocation.Visible    = true;
        }
        else
        {
            this.extddlLocation.Visible = false;
            this.lblLocation.Visible    = false;
        }
        stringBuilder.Append("Patient Name,Accident Date,Open Date,Insurance Name,Claim Number,Policy Number,Case Type,Case Status");
        stringBuilder1.Append("SZ_PATIENT_NAME,DT_DATE_OF_ACCIDENT,DT_DATE_OPEN,SZ_INSURANCE_NAME,SZ_CLAIM_NUMBER,SZ_POLICY_NUMBER,SZ_CASE_TYPE,SZ_STATUS_NAME");
        if (!((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ROLE_NAME.ToLower().Equals("admin"))
        {
            stringBuilder.Append(",Patient Phone");
            stringBuilder1.Append(",SZ_PATIENT_PHONE");
        }
        else
        {
            stringBuilder.Append(",Total,Paid,Pending");
            stringBuilder1.Append(",Total,Paid,Pending");
        }
        Bill_Sys_LoginBO billSysLoginBO = new Bill_Sys_LoginBO();
        string           str            = billSysLoginBO.getconfiguration(((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ROLE, ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);

        if (!(str != "") || str == null)
        {
            this.grdPatientList.Columns[27].Visible = false;
            this.grdPatientList.Columns[28].Visible = false;
        }
        else
        {
            this.grdPatientList.Columns[27].Visible = true;
            this.grdPatientList.Columns[28].Visible = true;
            stringBuilder.Append(",Case Type");
            stringBuilder1.Append(",SZ_CASE_TYPE");
            stringBuilder.Append(",Case Status");
            stringBuilder1.Append(",SZ_STATUS_NAME");
        }
        if (((Bill_Sys_SystemObject)this.Session["SYSTEM_OBJECT"]).SZ_SHOW_PROCEDURE_CODE_ON_INTEGRATION != "1")
        {
            this.grdPatientList.Columns[29].Visible = false;
        }
        else
        {
            this.grdPatientList.Columns[29].Visible = true;
            stringBuilder.Append(",Patient ID");
            stringBuilder1.Append(",SZ_PATIENT_ID_LHR");
        }
        if (((Bill_Sys_SystemObject)this.Session["SYSTEM_OBJECT"]).SZ_SHOW_DATE_OF_FIRST_TREATMENT != "1")
        {
            this.grdPatientList.Columns[30].Visible = false;
        }
        else
        {
            this.grdPatientList.Columns[30].Visible = true;
            stringBuilder.Append(",Date Of First Treatment");
            stringBuilder1.Append(",DT_FIRST_TREATMENT");
        }
        if (((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY)
        {
            stringBuilder.Append(",Provider Name");
            stringBuilder1.Append(",Provider_Name");
        }
        this.grdPatientList.ExportToExcelColumnNames = stringBuilder.ToString();
        this.grdPatientList.ExportToExcelFields      = stringBuilder1.ToString();
        Bill_Sys_PatientList.log.Debug("start Xgridbind.");
        this.con.SourceGrid                = this.grdPatientList;
        this.txtSearchBox.SourceGrid       = this.grdPatientList;
        this.grdPatientList.Page           = this.Page;
        this.grdPatientList.PageNumberList = this.con;
        Bill_Sys_PatientList.log.Debug("End Xgridbind.");
        if (((Bill_Sys_SystemObject)this.Session["SYSTEM_OBJECT"]).SZ_CHART_NO != "1")
        {
            this.grdPatientList.Columns[4].Visible = false;
            this.txtChartNo.Visible = false;
            this.lblChart.Visible   = false;
        }
        else
        {
            this.grdPatientList.Columns[4].Visible = true;
            this.txtChartNo.Visible = true;
            this.lblChart.Visible   = true;
        }
        if (!base.IsPostBack)
        {
            if (((Bill_Sys_SystemObject)this.Session["SYSTEM_OBJECT"]).SZ_SHOW_PROCEDURE_CODE_ON_INTEGRATION == "1")
            {
                this.lblpatientid.Visible = true;
                this.txtpatientid.Visible = true;
            }
            else
            {
                this.lblpatientid.Visible = false;
                this.txtpatientid.Visible = false;
            }
            this.txtCompanyID.Text       = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            this.extddlInsurance.Visible = false;
            this.extddlPatient.Visible   = false;
            this.fillcontrol();
            this.extddlCaseStatus.Flag_ID = this.txtCompanyID.Text.ToString();
            this.extddlCaseType.Flag_ID   = this.txtCompanyID.Text.ToString();
            this.extddlLocation.Flag_ID   = this.txtCompanyID.Text.ToString();
            string caseSatusId = (new CaseDetailsBO()).GetCaseSatusId(this.txtCompanyID.Text);
            this.extddlCaseStatus.Text = caseSatusId;
            this.fillcontrol();
            if (this.Session["CASE_LIST_GO_BUTTON"] != null)
            {
                this.utxtPatientName.Text           = this.Session["CASE_LIST_GO_BUTTON"].ToString();
                this.Session["CASE_LIST_GO_BUTTON"] = null;
            }
            if (!base.IsPostBack)
            {
                DataSet         userPreferences = new DataSet();
                UserPreferences userPreference  = new UserPreferences();
                userPreferences = userPreference.GetUserPreferences(((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ID, "SearchCase");
                if (userPreferences.Tables.Count <= 0)
                {
                    this.txtNORec.Text                 = "";
                    this.con.SourceGrid                = this.grdPatientList;
                    this.txtSearchBox.SourceGrid       = this.grdPatientList;
                    this.grdPatientList.Page           = this.Page;
                    this.grdPatientList.PageNumberList = this.con;
                    this.grdPatientList.XGridBindSearch();
                }
                else if (userPreferences.Tables[0].Rows.Count <= 0)
                {
                    this.txtNORec.Text                 = "";
                    this.con.SourceGrid                = this.grdPatientList;
                    this.txtSearchBox.SourceGrid       = this.grdPatientList;
                    this.grdPatientList.Page           = this.Page;
                    this.grdPatientList.PageNumberList = this.con;
                }
                else if (!(userPreferences.Tables[0].Rows[0]["sz_preferences"].ToString() != ""))
                {
                    this.txtNORec.Text                 = "";
                    this.con.SourceGrid                = this.grdPatientList;
                    this.txtSearchBox.SourceGrid       = this.grdPatientList;
                    this.grdPatientList.Page           = this.Page;
                    this.grdPatientList.PageNumberList = this.con;
                    this.grdPatientList.XGridBindSearch();
                }
                else
                {
                    string   str1      = userPreferences.Tables[0].Rows[0]["sz_preferences"].ToString();
                    char[]   chrArray  = new char[] { ',' };
                    string[] strArrays = str1.Split(chrArray);
                    for (i = 0; i < (int)strArrays.Length; i++)
                    {
                        string str2 = strArrays[i].ToString();
                        chrArray = new char[] { '=' };
                        string[] strArrays1 = str2.Split(chrArray);
                        try
                        {
                            if (!(strArrays1[0].ToString() != "DO_NOT_LOAD_PATIENT_LIST" ? true : !(strArrays1[1].ToString() == "true")))
                            {
                                this.txtNORec.Text                 = "1";
                                this.txtViewLast.Text              = "";
                                this.con.SourceGrid                = this.grdPatientList;
                                this.txtSearchBox.SourceGrid       = this.grdPatientList;
                                this.grdPatientList.Page           = this.Page;
                                this.grdPatientList.PageNumberList = this.con;
                                this.grdPatientList.XGridBindSearch();
                                break;
                            }
                            else if (!(strArrays1[0].ToString() != "SHOW_ONLY_LAST" ? true : !(strArrays1[1].ToString() != "00")))
                            {
                                this.txtNORec.Text                 = "";
                                this.txtViewLast.Text              = "";
                                this.con.SourceGrid                = this.grdPatientList;
                                this.txtSearchBox.SourceGrid       = this.grdPatientList;
                                this.grdPatientList.Page           = this.Page;
                                this.grdPatientList.PageNumberList = this.con;
                                this.grdPatientList.PageRowCount   = Convert.ToInt32(strArrays1[1].ToString());
                                if (strArrays1[1].ToString() == "00")
                                {
                                    this.grdPatientList.PageRowCount = 50;
                                }
                                this.grdPatientList.XGridBind();
                                break;
                            }
                            else if ((strArrays1[0].ToString() != "SHOW_ONLY_LAST40VIEWED" ? false : strArrays1[1].ToString() != "00"))
                            {
                                this.txtNORec.Text                 = "";
                                this.txtViewLast.Text              = "1";
                                this.con.SourceGrid                = this.grdPatientList;
                                this.txtSearchBox.SourceGrid       = this.grdPatientList;
                                this.grdPatientList.Page           = this.Page;
                                this.grdPatientList.PageNumberList = this.con;
                                this.grdPatientList.PageRowCount   = Convert.ToInt32(strArrays1[1].ToString());
                                if (strArrays1[1].ToString() == "00")
                                {
                                    this.grdPatientList.PageRowCount = 50;
                                }
                                this.grdPatientList.XGridBind();
                                break;
                            }
                        }
                        catch (Exception ex)
                        {
                            this.txtNORec.Text                 = "";
                            this.con.SourceGrid                = this.grdPatientList;
                            this.txtSearchBox.SourceGrid       = this.grdPatientList;
                            this.grdPatientList.Page           = this.Page;
                            this.grdPatientList.PageNumberList = this.con;
                            this.grdPatientList.XGridBindSearch();
                            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
                            using (Utils utility = new Utils())
                            {
                                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
                            }
                            string Elmahstr2 = "Error Request=" + id + ".Please share with Technical support.";
                            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + Elmahstr2);
                        }
                    }
                }
                //Method End
                using (Utils utility = new Utils())
                {
                    utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
                }
            }
            Bill_Sys_PatientList.log.Debug("Page_Load grdPatientList.XGridBindSearch() Completed");
            int count = this.grdPatientList.Rows.Count;
            this.clearcontrol();
        }
        if (!((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY)
        {
            this.grdPatientList.Columns[23].Visible = false;
            this.grdPatientList.Columns[24].Visible = false;
            this.grdPatientList.Columns[2].Visible  = true;
            this.grdPatientList.Columns[21].Visible = false;
            this.grdPatientList.Columns[22].Visible = true;
        }
        else
        {
            this.grdPatientList.Columns[3].Visible  = true;
            this.grdPatientList.Columns[19].Visible = false;
            this.grdPatientList.Columns[20].Visible = false;
        }
        string str3 = billSysLoginBO.getconfigurationlocation(((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ROLE, ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);

        if ((str3 == "" ? false : str3 != null))
        {
            this.grdPatientList.Columns[22].Visible = false;
        }
        if (!((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ROLE_NAME.ToLower().Equals("admin"))
        {
            this.grdPatientList.Columns[6].Visible  = true;
            this.grdPatientList.Columns[12].Visible = false;
            this.grdPatientList.Columns[13].Visible = false;
            this.grdPatientList.Columns[14].Visible = false;
        }
        else
        {
            this.grdPatientList.Columns[12].Visible = true;
            this.grdPatientList.Columns[13].Visible = true;
            this.grdPatientList.Columns[14].Visible = true;
            this.grdPatientList.Columns[6].Visible  = false;
        }
        if (((Bill_Sys_SystemObject)this.Session["SYSTEM_OBJECT"]).SZ_SHOW_PATIENT_PHONE == "1")
        {
            this.grdPatientList.Columns[6].Visible = true;
        }
        if (((Bill_Sys_SystemObject)this.Session["SYSTEM_OBJECT"]).SZ_CHECKINVALUE == "1")
        {
            this.grdPatientList.Columns[17].Visible = true;
            this.grdPatientList.Columns[18].Visible = true;
        }
        DataSet sysKey = new DataSet();

        sysKey = (new Bill_Sys_ProcedureCode_BO()).Get_Sys_Key("SS00040", this.txtCompanyID.Text);
        if ((sysKey.Tables.Count <= 0 || sysKey.Tables[0].Rows.Count <= 0 ? false : sysKey.Tables[0].Rows[0][0].ToString() == "0"))
        {
            this.grdPatientList.Columns[32].Visible = false;
        }
        if (((Bill_Sys_SystemObject)this.Session["SYSTEM_OBJECT"]).SZ_SOFT_DELETE == "True")
        {
            this.grdPatientList.Columns[35].Visible = true;
            this.btnSoftDelete.Visible = true;
        }
        if (base.Request.QueryString["Type"] == null || !(base.Request.QueryString["Type"].ToString() == "Quick"))
        {
            flag = true;
        }
        else
        {
            flag = (((Bill_Sys_SystemObject)this.Session["SYSTEM_OBJECT"]).SZ_NEW_BILL == "True" ? false : !(((Bill_Sys_SystemObject)this.Session["SYSTEM_OBJECT"]).SZ_VIEW_BILL == "True"));
        }
        if (!flag)
        {
            this.grdPatientList.Columns[15].Visible = true;
            for (i = 0; i < this.grdPatientList.Rows.Count; i++)
            {
                HyperLink hyperLink  = (HyperLink)this.grdPatientList.Rows[i].Cells[15].FindControl("lnkNew");
                HyperLink hyperLink1 = (HyperLink)this.grdPatientList.Rows[i].Cells[15].FindControl("lnkView");
                if (((Bill_Sys_SystemObject)this.Session["SYSTEM_OBJECT"]).SZ_NEW_BILL == "True")
                {
                    hyperLink.Visible = true;
                }
                if (((Bill_Sys_SystemObject)this.Session["SYSTEM_OBJECT"]).SZ_VIEW_BILL == "True")
                {
                    hyperLink1.Visible = true;
                }
            }
        }
        this.fillcontrol();
        if (!base.IsPostBack)
        {
            int dose = this.GetDosespotUserDetails();
            if (dose == 1)
            {
                string        text          = this.txtClinicId.Text;
                int           num           = Convert.ToInt32(this.txtDosespotUserId.Text);
                string        str4          = EncryptionCommon.CreatePhrase();
                string        str5          = EncryptionCommon.CreatePhraseEncryptedCombinedString(str4, text);
                string        str6          = EncryptionCommon.EncryptUserId(str4, num, text);
                APISoapClient aPISoapClient = new APISoapClient("APISoap12");
                SingleSignOn  singleSignOn  = new SingleSignOn()
                {
                    SingleSignOnClinicId = Convert.ToInt32(text),
                    SingleSignOnUserId   = num
                };
                str5 = "";
                str6 = "";
                this.SingleSignonCode(this.txtClinicId.Text, num.ToString(), out str5, out str6, false);
                singleSignOn.SingleSignOnCode         = str5;
                singleSignOn.SingleSignOnUserIdVerify = str6;
                GetRefillRequestsTransmissionErrorsRequest     getRefillRequestsTransmissionErrorsRequest     = new GetRefillRequestsTransmissionErrorsRequest();
                RefillRequestsTransmissionErrorsMessageRequest refillRequestsTransmissionErrorsMessageRequest = new RefillRequestsTransmissionErrorsMessageRequest()
                {
                    SingleSignOn = singleSignOn,
                    ClinicianId  = num
                };
                getRefillRequestsTransmissionErrorsRequest.GetRefillRequestsTransmissionErrorsMessageRequest = refillRequestsTransmissionErrorsMessageRequest;
                RefillRequestsTransmissionErrorsMessageResult refillRequestsTransmissionErrors = aPISoapClient.GetRefillRequestsTransmissionErrors(refillRequestsTransmissionErrorsMessageRequest);
                int    refillRequestsCount    = refillRequestsTransmissionErrors.RefillRequestsTransmissionErrors[0].RefillRequestsCount;
                int    transactionErrorsCount = refillRequestsTransmissionErrors.RefillRequestsTransmissionErrors[0].TransactionErrorsCount;
                string str7 = string.Concat(transactionErrorsCount.ToString(), " Transmission Error / ", refillRequestsCount.ToString(), " Refill requests");
                this.lnkDosespotErrors.Text    = str7;
                this.lnkDosespotErrors.Visible = true;
            }
            else
            {
                this.lnkDosespotErrors.Text    = "";
                this.lnkDosespotErrors.Visible = false;
            }
        }
        if ((base.IsPostBack ? false : this.Session["REMINDER"] != null))
        {
            this.Session["REMINDER"] = null;
            ReminderBO reminderBO = null;
            DataSet    dataSet1   = null;
            DataSet    dataSet2   = null;
            string     sZUSERID   = "";
            reminderBO = new ReminderBO();
            dataSet1   = new DataSet();
            sZUSERID   = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ID;
            DateTime dateTime = Convert.ToDateTime(DateTime.Now.ToShortDateString());
            dataSet1 = reminderBO.LoadReminderDetails(sZUSERID, dateTime);
            dataSet2 = reminderBO.LoadReminderDetailsforAdd(sZUSERID, dateTime, ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
            if ((dataSet1.Tables[0].Rows.Count > 0 || dataSet1.Tables[1].Rows.Count > 0 ? true : dataSet2.Tables[0].Rows.Count > 0))
            {
                this.Page.RegisterStartupScript("ss", "<script language='javascript'> ReminderPopup();</script>");
            }
        }
    }
Exemplo n.º 24
0
        public long DeleteReminder(ReminderBO reminderBO)
        {
            var query = "DELETE FROM tblReminder WHERE [Id]=" + reminderBO.Id;

            return(reminderDB.UpsertDeleteReminder(query));
        }
Exemplo n.º 25
0
        public DataTable GetReminder(ReminderBO reminderBO)
        {
            var query = "SELECT * FROM tblReminder WHERE Date ='" + reminderBO.Date.Date + "'";

            return(reminderDB.GetReminder(query));
        }
Exemplo n.º 26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //Logging Start
        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());
        }
        log.Debug("Search case page_load");
        String scriptFunc  = "";
        String scriptFunc2 = "";

        //Page.Title = (String)GetLocalResourceObject("page_title");
        utxtUserId.Text = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID;
        scriptFunc      = "<script language=JavaScript> " + "function autoComplete (field, select, property, forcematch) {" + "var found = false;" + "for (var i = 0; i < select.options.length; i++) {" + "if (select.options[i][property].toUpperCase().indexOf(field.value.toUpperCase()) == 0) {" + "		found=true; break;"+ "}" + "}" + "if (found) { " + "select.selectedIndex = i; " + "}else {" + "select.selectedIndex = -1;" + "}" + "if (field.createTextRange) {" + "if (forcematch && !found) {" + "field.value=field.value.substring(0,field.value.length-1); " + "return;" + "}" + "var cursorKeys ='8;46;37;38;39;40;33;34;35;36;45;';" + "if (cursorKeys.indexOf(event.keyCode+';') == -1) {" + "var r1 = field.createTextRange();" + "var oldValue = r1.text;" + "var newValue = found ? select.options[i][property] : oldValue;" + "if (newValue != field.value) {" + "field.value = newValue;" + "var rNew = field.createTextRange();" + "rNew.moveStart('character', oldValue.length) ;" + "rNew.select();" + "}" + "}" + "}" + "} </script>";
        RegisterClientScriptBlock("ClientScript", scriptFunc);
        ajAutoIns.ContextKey  = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
        ajAutoName.ContextKey = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
        btnSoftDelete.Attributes.Add("onclick", "return Validate()");
        //ValidateExportBill
        btnExportToExcel.Attributes.Add("onclick", "return ValidateExportBill()");
        // txtPatientName.Attributes.Add("onKeyUp", "autoComplete(this,this.form.ctl00_ContentPlaceHolder1_extddlPatient,'text',true);");
        // txtInsuranceCompany.Attributes.Add("onKeyUp", "autoComplete(this,this.form.ctl00_ContentPlaceHolder1_extddlInsurance,'text',true);");
        //if (Session["CASE_LIST_GO_BUTTON"] != null)
        //{
        //    utxtCaseNo.Text = Session["CASE_LIST_GO_BUTTON"].ToString();
        //    Session["CASE_LIST_GO_BUTTON"] = null;
        //}


        if (!IsPostBack)
        {
            try
            {
                DataSet dsBit41 = new System.Data.DataSet();
                Bill_Sys_ProcedureCode_BO objPBO_1 = new Bill_Sys_ProcedureCode_BO();
                dsBit41 = objPBO_1.Get_Sys_Key("SS00041", ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                if (dsBit41.Tables.Count > 0 && dsBit41.Tables[0].Rows.Count > 0)
                {
                    string szBitVal1 = dsBit41.Tables[0].Rows[0][0].ToString();
                    if (szBitVal1 == "0")
                    {
                        Session["SendPatientToDoctor"] = false;
                    }
                    else
                    {
                        Session["SendPatientToDoctor"] = true;
                    }
                }
            }
            catch (Exception ex)
            {
                Session["SendPatientToDoctor"] = false;
                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);
            }
        }

        StringBuilder szExportoExcelColumname = new StringBuilder();
        StringBuilder szExportoExcelField     = new StringBuilder();

        szExportoExcelColumname.Append("Case #,");
        if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true)
        {
            szExportoExcelField.Append("SZ_RECASE_NO,");
            //grdPatientList.Columns[25].Visible = true;
        }
        else
        {
            szExportoExcelField.Append("SZ_CASE_NO,");
        }
        if (((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_CHART_NO == "1")
        {
            szExportoExcelColumname.Append("Chart No,");
            szExportoExcelField.Append("SZ_CHART_NO,");
        }

        if ((((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_LOCATION) != "1")
        {
            extddlLocation.Visible = false;
            lblLocation.Visible    = false;
        }
        else
        {
            extddlLocation.Visible = true;
            lblLocation.Visible    = true;
        }
        szExportoExcelColumname.Append("Patient Name,Accident Date,Open Date,Insurance Name,Claim Number,Policy Number,Case Type,Case Status");
        szExportoExcelField.Append("SZ_PATIENT_NAME,DT_DATE_OF_ACCIDENT,DT_DATE_OPEN,SZ_INSURANCE_NAME,SZ_CLAIM_NUMBER,SZ_POLICY_NUMBER,SZ_CASE_TYPE,SZ_STATUS_NAME");
        if (((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ROLE_NAME.ToLower().Equals("admin"))
        {
            szExportoExcelColumname.Append(",Total,Paid,Pending");
            szExportoExcelField.Append(",Total,Paid,Pending");
        }
        else
        {
            szExportoExcelColumname.Append(",Patient Phone");
            szExportoExcelField.Append(",SZ_PATIENT_PHONE");
        }



        Bill_Sys_LoginBO _bill_Sys_LoginBO = new Bill_Sys_LoginBO();
        string           str = _bill_Sys_LoginBO.getconfiguration(((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ROLE, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);

        if (str != "" && str != null)
        {
            //grdPatientList.Columns[27].Visible = true;//change 28 to 27
            //grdPatientList.Columns[28].Visible = true;//change 29 to 28

            szExportoExcelColumname.Append(",Case Type");
            szExportoExcelField.Append(",SZ_CASE_TYPE");
            szExportoExcelColumname.Append(",Case Status");
            szExportoExcelField.Append(",SZ_STATUS_NAME");
        }
        else
        {
            //grdPatientList.Columns[27].Visible = false;//change 28 to 27
            //grdPatientList.Columns[28].Visible = false;
        }



        if (((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_SHOW_PROCEDURE_CODE_ON_INTEGRATION == "1")
        {
            //grdPatientList.Columns[29].Visible = true;
            szExportoExcelColumname.Append(",Patient ID");
            szExportoExcelField.Append(",SZ_PATIENT_ID_LHR");
        }
        else
        {
            //grdPatientList.Columns[29].Visible = false;
        }
        if (((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_SHOW_DATE_OF_FIRST_TREATMENT == "1")
        {
            //grdPatientList.Columns[30].Visible = true;
            szExportoExcelColumname.Append(",Date Of First Treatment");
            szExportoExcelField.Append(",DT_FIRST_TREATMENT");
        }
        else
        {
            //grdPatientList.Columns[30].Visible = false;
        }


        //grdPatientList.ExportToExcelColumnNames = szExportoExcelColumname.ToString();
        ////grdPatientList.Con = xcon;
        //grdPatientList.ExportToExcelFields = szExportoExcelField.ToString();
        //log.Debug("start Xgridbind.");
        //this.con.SourceGrid = grdPatientList;
        //this.txtSearchBox.SourceGrid = grdPatientList;
        //this.grdPatientList.Page = this.Page;
        //this.grdPatientList.PageNumberList = this.con;
        //log.Debug("End Xgridbind.");
        if (((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_CHART_NO == "1")
        {
            //grdPatientList.Columns[4].Visible = true;//chart no col
            txtChartNo.Visible = true;
            lblChart.Visible   = true;
        }
        else
        {
            //grdPatientList.Columns[4].Visible = false;//chart no col
            txtChartNo.Visible = false;
            lblChart.Visible   = false;
        }
        if (!IsPostBack)
        { //Taking Login Company Id
            if (((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_SHOW_PROCEDURE_CODE_ON_INTEGRATION != "1")
            {
                lblpatientid.Visible = false;
                txtpatientid.Visible = false;
            }
            else
            {
                lblpatientid.Visible = true;
                txtpatientid.Visible = true;
            }
            txtCompanyID.Text       = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
            extddlInsurance.Visible = false;
            extddlPatient.Visible   = false;
            //  utxtCompanyID.Text = txtCompanyID.Text;
            fillcontrol();

            //  extddlPatient.Flag_ID = txtCompanyID.Text.ToString();
            extddlCaseStatus.Flag_ID = txtCompanyID.Text.ToString();
            extddlCaseType.Flag_ID   = txtCompanyID.Text.ToString();
            //  extddlInsurance.Flag_ID = txtCompanyID.Text.ToString();
            extddlLocation.Flag_ID = txtCompanyID.Text.ToString();
            CaseDetailsBO _objCaseDetailsBO = new CaseDetailsBO();
            string        szCaseStatausID   = _objCaseDetailsBO.GetCaseSatusId(txtCompanyID.Text);
            extddlCaseStatus.Text = szCaseStatausID;
            fillcontrol();
            if (Session["CASE_LIST_GO_BUTTON"] != null)
            {
                utxtPatientName.Text           = Session["CASE_LIST_GO_BUTTON"].ToString();
                Session["CASE_LIST_GO_BUTTON"] = null;
            }
            //string ConnectionString = ConfigurationSettings.AppSettings["Connection_String"].ToString();
            //SqlConnection con = new SqlConnection(ConnectionString);
            //SqlCommand cmd = new SqlCommand("sp_get_patientlist_agent", con);
            //cmd.CommandType = CommandType.StoredProcedure;
            //cmd.Parameters.AddWithValue("@SZ_COMPANY_ID", txtCompanyID.Text);
            //cmd.Parameters.AddWithValue("@sz_user_id", ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID);
            //SqlDataAdapter da = new SqlDataAdapter(cmd);
            //DataTable dt = new DataTable();
            //da.Fill(dt);
            //grdPatientList.DataSource = dt;
            //grdPatientList.DataBind();


            //grdPatientList.XGridBind();
            //grdPatientList.XGridBindSearch();
            log.Debug("Page_Load grdPatientList.XGridBindSearch() Completed");

            //int i = grdPatientList.Rows.Count;

            clearcontrol();

            //   ExportToExcelFields="SZ_CASE_NO,SZ_CHART_NO,SZ_PATIENT_NAME,DT_DATE_OF_ACCIDENT,DT_DATE_OPEN,SZ_INSURANCE_NAME,SZ_CLAIM_NUMBER,SZ_POLICY_NUMBER,Total,Paid,Pending" ;
            //ExportToExcelColumnNames="Case #,Chart No,Patient Name,Accident Date,Open Date,Insurance Name,Claim Number,Policy Number,Total,Paid,Pending"
        }
        // SoftDelete();

        if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true)
        {
            //grdPatientList.Columns[3].Visible = true;
            //grdPatientList.Columns[19].Visible = false;
            //grdPatientList.Columns[20].Visible = false;
            //grdPatientList.Columns[21].Visible = true;
            //grdPatientList.Columns[23].Visible = true;//doctor name column
            //grdPatientList.Columns[24].Visible = true;//office name column
            //Provider name column
        }
        else
        {
            //grdPatientList.Columns[23].Visible = false;//doctor name column
            //grdPatientList.Columns[24].Visible = false;//office name column
            //grdPatientList.Columns[2].Visible = true;
            //grdPatientList.Columns[21].Visible = false;
            //grdPatientList.Columns[22].Visible = true;//location column
        }
        string strlocation = _bill_Sys_LoginBO.getconfigurationlocation(((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ROLE, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);

        if (strlocation != "" && strlocation != null)
        {
            //grdPatientList.Columns[22].Visible = false;
        }
        ///Check for chart no seting
        //((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ROLE
        //txtCompanyID.Text


        //check for Total ,Paid and Pending
        if (((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ROLE_NAME.ToLower().Equals("admin"))
        {
            //grdPatientList.Columns[12].Visible = true;//total col
            //grdPatientList.Columns[13].Visible = true;//paid col
            //grdPatientList.Columns[14].Visible = true;//pending col
            //grdPatientList.Columns[6].Visible = false;//6
        }
        else
        {
            //grdPatientList.Columns[6].Visible = true;//6
            //grdPatientList.Columns[12].Visible = false;
            //grdPatientList.Columns[13].Visible = false;
            //grdPatientList.Columns[14].Visible = false;
        }
        if (((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_SHOW_PATIENT_PHONE == "1")
        {
            //grdPatientList.Columns[6].Visible = true;//6
        }

        //Check for Check in  and Check out
        if (((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_CHECKINVALUE == "1")
        {
            //grdPatientList.Columns[17].Visible = true;//check in col
            //grdPatientList.Columns[18].Visible = true;//check out col
        }


        DataSet dsBit = new System.Data.DataSet();
        Bill_Sys_ProcedureCode_BO objPBO = new Bill_Sys_ProcedureCode_BO();

        dsBit = objPBO.Get_Sys_Key("SS00040", txtCompanyID.Text);
        if (dsBit.Tables.Count > 0 && dsBit.Tables[0].Rows.Count > 0)
        {
            string szBitVal = dsBit.Tables[0].Rows[0][0].ToString();
            if (szBitVal == "0")
            {
                //grdPatientList.Columns[32].Visible = false;
            }
        }
        //Check For Soft Delete Button and delete checkbox

        if (((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_SOFT_DELETE == "True")
        {
            //grdPatientList.Columns[33].Visible = true;//delete checkbox//change 26 to 27 then 29// 30 to 31//32 to 33 --atul
            btnSoftDelete.Visible = true;
        }
        ///for Quick Bill Entry  link
        if (Request.QueryString["Type"] != null)
        {
            if (Request.QueryString["Type"].ToString() == "Quick" && (((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_NEW_BILL == "True" || ((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_VIEW_BILL == "True"))
            {
                //grdPatientList.Columns[15].Visible = true;//Bills column

                //for (int i = 0; i < grdPatientList.Rows.Count; i++)
                //{
                //    HyperLink lnkN = (HyperLink)grdPatientList.Rows[i].Cells[15].FindControl("lnkNew");
                //    HyperLink lnkV = (HyperLink)grdPatientList.Rows[i].Cells[15].FindControl("lnkView");
                //    if (((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_NEW_BILL == "True")
                //    {
                //        lnkN.Visible = true;
                //    }
                //    if (((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_VIEW_BILL == "True")
                //    {
                //        lnkV.Visible = true;
                //    }

                //}
            }
        }

        // extddlCaseType.Selected_Text = "OPEN";
        // used for  export to excel open not refresh grid
        fillcontrol();
        //grdPatientList.Columns[28].Visible = false;
        //grdPatientList.Columns[29].Visible = false;

        //SetTitle(this.Page);



        if (!IsPostBack)
        {
            if (Session["REMINDER"] != null)
            {
                Session["REMINDER"] = null;
                ReminderBO objReminder = null;
                DataSet    dsReminder  = null;
                DataSet    addReminder = null;
                string     strUserId   = "";
                DateTime   dtCurrent_Date;
                objReminder    = new ReminderBO();
                dsReminder     = new DataSet();
                strUserId      = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID;
                dtCurrent_Date = Convert.ToDateTime(System.DateTime.Now.ToShortDateString());
                dsReminder     = objReminder.LoadReminderDetails(strUserId, dtCurrent_Date);
                addReminder    = objReminder.LoadReminderDetailsforAdd(strUserId, dtCurrent_Date, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
                if (dsReminder.Tables[0].Rows.Count > 0 || dsReminder.Tables[1].Rows.Count > 0 || addReminder.Tables[0].Rows.Count > 0)
                {
                    Page.RegisterStartupScript("ss", "<script language='javascript'> ReminderPopup();</script>");
                }
            }

            //ReminderBO _ReminderBO = new ReminderBO();
            //DataSet dssetting = new DataSet();
            //dssetting = _ReminderBO.IMSetting("SS00015", txtCompanyID.Text);
            //if (dssetting.Tables[0].Rows.Count > 0)
            //{
            //    if (dssetting.Tables[0].Rows[0]["SZ_SYS_SETTING_VALUE"].ToString() == "1")
            //    {
            //        if (Session["IMDETAILS"] != null)
            //        {
            //            Session["IMDETAILS"] = null;
            //            ReminderBO objim = null;
            //            DataSet dsIM = null;
            //            objim = new ReminderBO();
            //            dsIM = new DataSet();
            //            dsIM = objim.LoadCheckimDetails(txtCompanyID.Text);
            //            if (dsIM.Tables[0].Rows.Count > 0)
            //            {
            //                Page.RegisterStartupScript("im", "<script language='javascript'> showimcheckPopup();</script>");
            //            }
            //        }
            //    }
            //}
        }



        //Method End

        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
Exemplo n.º 27
0
    protected void Page_Load(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());
        }

        this.Page.LoadComplete += new EventHandler(Page_Load_Complete);
        log.Debug("Bill_Sys_Casedetails. Method - Page_Load_Start : " + DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString() + ":" + DateTime.Now.Second.ToString() + ":" + DateTime.Now.Millisecond.ToString());
        //ScriptManager.RegisterClientScriptBlock(this, GetType(), "ss", "plusvisibleimage();", true);

        //string urlleft = Request.Url.GetLeftPart(UriPartial.Path);
        //string url = Request.Url.ToString();

        string Param = Request.QueryString["dt"].ToString();

        string changeParam = WebUtils.DecodeUrlString(Param);

        String strPassPhrase         = "Pas5pr@se";        // can be any string
        String strSaltValue          = "s@1tValue";        // can be any string
        String strHashAlgorithm      = "SHA1";             // can be "MD5"
        int    intPasswordIterations = 2;                  // can be any number
        String strInitVector         = "@1B2c3D4e5F6g7H8"; // must be 16 bytes
        int    intKeySize            = 256;

        string decrupt = Bill_Sys_EncryDecry.Decrypt(changeParam, strPassPhrase, strSaltValue, strHashAlgorithm, intPasswordIterations, strInitVector, intKeySize);

        //string decryptUrl = urlleft+"?" + decrupt;

        string[] spl = decrupt.Split('&');

        string caseid = spl[0].Replace("CaseID=", "");
        string id_    = spl[1].Replace("cmp=", "");

        string compnyid = id_.Replace("'", "");

        try
        {
            if (!IsPostBack)
            {
                if (caseid != null)
                {
                    //caseID = caseid;
                    if (caseid.ToString() != "")
                    {
                        CaseDetailsBO       _caseDetailsBO       = new CaseDetailsBO();
                        Bill_Sys_CaseObject _bill_Sys_CaseObject = new Bill_Sys_CaseObject();
                        _bill_Sys_CaseObject.SZ_PATIENT_ID = _caseDetailsBO.GetCasePatientID(caseid.ToString(), "");
                        _bill_Sys_CaseObject.SZ_CASE_ID    = caseid.ToString();
                        if (compnyid != null)
                        {
                            _bill_Sys_CaseObject.SZ_CASE_NO = _caseDetailsBO.GetCaseNo(_bill_Sys_CaseObject.SZ_CASE_ID, compnyid.ToString());
                            Session["company"] = compnyid.ToString();
                        }
                        else
                        {
                            _bill_Sys_CaseObject.SZ_CASE_NO = _caseDetailsBO.GetCaseNo(_bill_Sys_CaseObject.SZ_CASE_ID, Session["company"].ToString());
                        }

                        _bill_Sys_CaseObject.SZ_PATIENT_NAME = _caseDetailsBO.GetPatientName(_bill_Sys_CaseObject.SZ_PATIENT_ID);
                        _bill_Sys_CaseObject.SZ_COMAPNY_ID   = Session["company"].ToString();
                        Session["CASE_OBJECT"] = _bill_Sys_CaseObject;
                    }
                }
                if (Session["CASE_OBJECT"] != null)
                {
                    txtCaseID.Text     = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
                    Session["company"] = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_COMAPNY_ID;
                }
                else
                {
                    Response.Redirect("Bill_Sys_SearchCase.aspx", false);
                }

                LoadNoteGrid();
                caseID = ((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID;
                ShowPopupNotes(((Bill_Sys_CaseObject)Session["CASE_OBJECT"]).SZ_CASE_ID);


                //hlnkAssociate.Visible = true;
                grdAssociatedDiagnosisCode.Visible = false;
                //divAssociatedCode.Visible = true;
                _bill_Sys_ProcedureCode_BO            = new Bill_Sys_ProcedureCode_BO();
                grdAssociatedDiagnosisCode.DataSource = _bill_Sys_ProcedureCode_BO.GetAssociatedDiagnosisCode_List(caseID, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID).Tables[0];
                grdAssociatedDiagnosisCode.DataBind();
                //////////////////////
                //CREATE SESSION FOR DOC MANAGER,TEMPLATE MANAGER,Notes,Bills

                Bill_Sys_Case _bill_Sys_Case = new Bill_Sys_Case();
                _bill_Sys_Case.SZ_CASE_ID = txtCaseID.Text;

                Session["CASEINFO"] = _bill_Sys_Case;

                Session["PassedCaseID"] = txtCaseID.Text;
                String szURL    = "";
                String szCaseID = Session["PassedCaseID"].ToString();
                Session["QStrCaseID"]   = szCaseID;
                Session["Case_ID"]      = szCaseID;
                Session["Archived"]     = "0";
                Session["QStrCID"]      = szCaseID;
                Session["SelectedID"]   = szCaseID;
                Session["DM_User_Name"] = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["User_Name"]    = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_NAME;
                Session["SN"]           = "0";
                Session["LastAction"]   = "vb_CaseInformation.aspx";


                Session["SZ_CASE_ID_NOTES"] = txtCaseID.Text;

                Session["TM_SZ_CASE_ID"] = txtCaseID.Text;

                LoadDataOnPage();
                UserPatientInfoControl.GetPatienDeskList(((Bill_Sys_CaseObject)(Session["CASE_OBJECT"])).SZ_CASE_ID, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
            }


            if (!IsPostBack)
            {
                ReminderBO objReminder = null;
                DataSet    dsReminder  = null;
                string     strUserId   = "";
                string     SzCaseID    = "";
                DateTime   dtCurrent_Date;
                objReminder    = new ReminderBO();
                dsReminder     = new DataSet();
                strUserId      = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID;
                SzCaseID       = txtCaseID.Text;
                dtCurrent_Date = Convert.ToDateTime(System.DateTime.Now.ToShortDateString());
                dsReminder     = objReminder.LoadReminderDetailsForCaseDeatils(strUserId, dtCurrent_Date, SzCaseID);
            }

            log.Debug("Bill_Sys_Casedetails. Method - Page_Load_End : " + DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString() + ":" + DateTime.Now.Second.ToString() + ":" + DateTime.Now.Millisecond.ToString());
        }
        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);
        }
        #region "check version readonly or not"
        string app_status = ((Bill_Sys_BillingCompanyObject)Session["APPSTATUS"]).SZ_READ_ONLY.ToString();
        if (app_status.Equals("True"))
        {
            Bill_Sys_ChangeVersion cv = new Bill_Sys_ChangeVersion(this.Page);
            cv.MakeReadOnlyPage("Bill_Sys_CaseDetails.aspx");
        }
        #endregion

        //Method End

        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }