Beispiel #1
0
 protected void btnSaveEmail_OnClick(object sender, EventArgs e)
 {
     this.lblmsgEmail.Text = "";
     if (this.extddlLawFirm.Text != "NA")
     {
         if (this.txtEmailAddress.Text != "")
         {
             DataSet  set  = new DataSet();
             string   str  = ConfigurationManager.AppSettings["Connection_String"];
             SQLToDAO odao = new SQLToDAO(str);
             FileTransferEmailNotifications_DAO s_dao = new FileTransferEmailNotifications_DAO();
             s_dao.sz_company_id          = this.txtCompanyID.Text;
             s_dao.sz_law_firm_company_id = this.extddlLawFirm.Text;
             s_dao.sz_user_id             = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ID;
             s_dao.sz_email = this.txtEmailAddress.Text;
             s_dao.i_flag   = 0;
             set            = odao.LoadDataSet("SP_MANAGE_FILE_TRANSFER_NOTIFICATIONS", "mbs.dao.FileTransferEmailNotifications_DAO", s_dao, "mbs.dao");
             if ((set.Tables.Count >= 1) && (set.Tables[0].Rows.Count >= 1))
             {
                 this.txtEmailAddress.Text = set.Tables[0].Rows[0][0].ToString();
             }
             this.lblmsgEmail.Text = "Record Inserted Successfully";
         }
         else
         {
             this.lblmsgEmail.Text = "Please Enter Email Address";
         }
     }
     else
     {
         this.lblmsgEmail.Text = "Please Select LawFirm";
     }
 }
Beispiel #2
0
    protected void OnextendDropDown_SelectedIndexChanged(object sender, EventArgs e)
    {
        this.lblmsgEmail.Text     = "";
        this.txtEmailAddress.Text = "";
        DataSet  set  = new DataSet();
        string   str  = ConfigurationManager.AppSettings["Connection_String"];
        SQLToDAO odao = new SQLToDAO(str);
        FileTransferEmailNotifications_DAO s_dao = new FileTransferEmailNotifications_DAO();

        s_dao.sz_company_id          = this.txtCompanyID.Text;
        s_dao.sz_law_firm_company_id = this.extddlLawFirm.Text;
        s_dao.i_flag = 1;
        set          = odao.LoadDataSet("SP_MANAGE_FILE_TRANSFER_NOTIFICATIONS", "mbs.dao.FileTransferEmailNotifications_DAO", s_dao, "mbs.dao");
        if ((set.Tables.Count >= 1) && (set.Tables[0].Rows.Count >= 1))
        {
            this.txtEmailAddress.Text = set.Tables[0].Rows[0][0].ToString();
        }
    }
    public 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());
        }
        int  num  = 0;
        bool flag = false;

        try
        {
            this.txtPatientName.Text = this.txtPatientName.Text.Replace("'", "");
            this.txtPatientName.Text = this.txtPatientName.Text.Replace("\"", "");
            DataTable dataTable = new DataTable();
            dataTable.Columns.Add("SZ_COLOR_CODE");
            dataTable.Columns.Add("SZ_CASE_ID");
            dataTable.Columns.Add("sz_ID");
            dataTable.Columns.Add("SZ_CASE_NAME");
            dataTable.Columns.Add("SZ_CASE_NO");
            dataTable.Columns.Add("SZ_CASE_TYPE_ID");
            dataTable.Columns.Add("BT_DELETE");
            dataTable.Columns.Add("SZ_CHART_NO");
            dataTable.Columns.Add("SZ_PATIENT_ID");
            dataTable.Columns.Add("DT_DATE_OF_ACCIDENT");
            dataTable.Columns.Add("SZ_APPOINTMENT");
            dataTable.Columns.Add("SZ_PATIENT_NAME");
            dataTable.Columns.Add("sz_chart_number");
            dataTable.Columns.Add("i_rfo_chart_no");
            dataTable.Columns.Add("SZ_CASE_TYPE_NAME");
            dataTable.Columns.Add("BT_ASSOCIATE_DIAGNOSIS_CODE");
            dataTable.Columns.Add("SZ_COMPANY_ID");
            dataTable.Columns.Add("SZ_COMPANY_NAME");
            dataTable.Columns.Add("DT_CREATED_DATE");

            if (this.Chkmult.Checked && this.txtPatientName.Text != "" && this.txtCaseNo.Text.Trim().Length == 0 && this.txtChartNumber.Text.Trim().Length == 0 && (this.extddlLocation.Text == "NA" || this.extddlLocation.Text == "") && this.grdCaseMaster.Items.Count > 0)
            {
                for (int i = 0; i < this.grdCaseMaster.Items.Count; i++)
                {
                    DataRow text = dataTable.NewRow();
                    text["SZ_CASE_ID"]          = this.grdCaseMaster.Items[i].Cells[2].Text;
                    text["SZ_CASE_NO"]          = this.grdCaseMaster.Items[i].Cells[1].Text;
                    text["SZ_PATIENT_ID"]       = this.grdCaseMaster.Items[i].Cells[3].Text;
                    text["DT_DATE_OF_ACCIDENT"] = this.grdCaseMaster.Items[i].Cells[6].Text;
                    text["SZ_PATIENT_NAME"]     = this.grdCaseMaster.Items[i].Cells[4].Text;
                    text["sz_chart_number"]     = this.grdCaseMaster.Items[i].Cells[8].Text;
                    text["i_rfo_chart_no"]      = this.grdCaseMaster.Items[i].Cells[9].Text;
                    text["SZ_CASE_TYPE_NAME"]   = this.grdCaseMaster.Items[i].Cells[5].Text;
                    text["DT_CREATED_DATE"]     = this.grdCaseMaster.Items[i].Cells[7].Text;
                    dataTable.Rows.Add(text);
                }
            }
            string caseList = "";
            if (this.txtCaseNo.Text.Trim().Length != 0)
            {
                caseList = this.getCaseList();
            }
            SQLToDAO sQLToDAO = new SQLToDAO(ConfigurationManager.AppSettings["Connection_String"]);
            AddVisit addVisit = new AddVisit();
            if (this.txtChartNumber.Text.Trim().Length != 0)
            {
                addVisit.sz_chart_number = this.getChartNumberList();
            }
            if (!this.RowLocation.Visible)
            {
                addVisit.sz_company_id   = this.txtCompanyID.Text;
                addVisit.sz_case_no      = caseList;
                addVisit.sz_patient_name = this.txtPatientName.Text;
                addVisit.sz_location_id  = "";
                addVisit.sz_case_status  = this.rdoISActivePatient.SelectedValue.ToString();
            }
            else
            {
                addVisit.sz_company_id   = this.txtCompanyID.Text;
                addVisit.sz_case_no      = caseList;
                addVisit.sz_patient_name = this.txtPatientName.Text;
                addVisit.sz_location_id  = extddlLocation.Text;
                addVisit.sz_case_status  = this.rdoISActivePatient.SelectedValue.ToString();
            }
            DataTable dataTable1 = new DataTable();
            DataTable dataTable2 = new DataTable();
            DataSet   dataSet    = new DataSet();
            string[]  strArrays  = new string[] { "0" };
            if (caseList != "")
            {
                strArrays = this._caseno.Split(new char[] { ',' });
                dataSet   = sQLToDAO.LoadDataSet("sp_search_added_visits", "mbs.dao.AddVisit", addVisit, "mbs.dao");
                dataTable1.Columns.Add("sz_case_no");
                dataTable1.Columns.Add("sz_Case_id");
                dataTable1.Columns.Add("sz_patient_id");
                dataTable1.Columns.Add("sz_patient_name");
                dataTable1.Columns.Add("sz_Case_type_name");
                dataTable1.Columns.Add("dt_date_of_accident");
                dataTable1.Columns.Add("dt_created_Date");
                dataTable1.Columns.Add("sz_chart_number");
                dataTable1.Columns.Add("i_rfo_chart_no");
            }
            if (strArrays[0].ToString() != "0")
            {
                for (int j = 0; (int)strArrays.Length > j; j++)
                {
                    if (strArrays[j].ToString() == "")
                    {
                        num++;
                    }
                    else
                    {
                        int num1 = 0;
                        while (dataSet.Tables[0].Rows.Count > num1)
                        {
                            dataSet.Tables[0].Rows[num1]["SZ_CASE_NO"].ToString();
                            if (dataSet.Tables[0].Rows[num1]["SZ_CASE_NO"].ToString() == strArrays[num].ToString())
                            {
                                DataRow item = dataTable1.NewRow();
                                item["sz_case_no"]          = dataSet.Tables[0].Rows[num1]["sz_case_no"];
                                item["sz_Case_id"]          = dataSet.Tables[0].Rows[num1]["sz_Case_id"];
                                item["sz_patient_id"]       = dataSet.Tables[0].Rows[num1]["sz_patient_id"];
                                item["sz_patient_name"]     = dataSet.Tables[0].Rows[num1]["sz_patient_name"];
                                item["sz_Case_type_name"]   = dataSet.Tables[0].Rows[num1]["sz_Case_type_name"];
                                item["dt_date_of_accident"] = dataSet.Tables[0].Rows[num1]["dt_date_of_accident"];
                                item["dt_created_Date"]     = dataSet.Tables[0].Rows[num1]["dt_created_Date"];
                                item["sz_chart_number"]     = dataSet.Tables[0].Rows[num1]["sz_chart_number"];
                                item["i_rfo_chart_no"]      = dataSet.Tables[0].Rows[num1]["i_rfo_chart_no"];
                                dataTable1.Rows.Add(item);
                                flag = true;
                            }
                            if (!flag)
                            {
                                num1++;
                            }
                            else
                            {
                                dataSet.Tables[0].Rows[num1].Delete();
                                flag = false;
                                dataSet.AcceptChanges();
                                break;
                            }
                        }
                        num++;
                    }
                }
                this.grdCaseMaster.DataSource = dataTable1;
                this.grdCaseMaster.DataBind();
            }
            else if (!this.Chkmult.Checked || !(this.txtPatientName.Text != "") || this.txtCaseNo.Text.Trim().Length != 0 || this.txtChartNumber.Text.Trim().Length != 0 || !(this.extddlLocation.Text == "NA") && !(this.extddlLocation.Text == ""))
            {
                this.grdCaseMaster.DataSource = sQLToDAO.LoadDataSet("sp_search_added_visits", "mbs.dao.AddVisit", addVisit, "mbs.dao");
                this.grdCaseMaster.DataBind();
            }
            else if (this.grdCaseMaster.Items.Count <= 0)
            {
                this.grdCaseMaster.DataSource = sQLToDAO.LoadDataSet("sp_search_added_visits", "mbs.dao.AddVisit", addVisit, "mbs.dao");
                this.grdCaseMaster.DataBind();
            }
            else
            {
                DataSet dataSet1 = sQLToDAO.LoadDataSet("sp_search_added_visits", "mbs.dao.AddVisit", addVisit, "mbs.dao");
                for (int k = 0; k < dataSet1.Tables[0].Rows.Count; k++)
                {
                    int num2 = 0;
                    for (int l = 0; l < dataTable.Rows.Count; l++)
                    {
                        if (dataSet1.Tables[0].Rows[k]["SZ_CASE_ID"].ToString() == dataTable.Rows[l]["SZ_CASE_ID"].ToString())
                        {
                            num2 = 1;
                        }
                    }
                    if (num2 != 1)
                    {
                        DataRow str = dataTable.NewRow();
                        str["SZ_CASE_ID"]          = dataSet1.Tables[0].Rows[k]["SZ_CASE_ID"].ToString();
                        str["SZ_CASE_NO"]          = dataSet1.Tables[0].Rows[k]["SZ_CASE_NO"].ToString();
                        str["SZ_PATIENT_ID"]       = dataSet1.Tables[0].Rows[k]["SZ_PATIENT_ID"].ToString();
                        str["DT_DATE_OF_ACCIDENT"] = dataSet1.Tables[0].Rows[k]["DT_DATE_OF_ACCIDENT"].ToString();
                        str["SZ_PATIENT_NAME"]     = dataSet1.Tables[0].Rows[k]["SZ_PATIENT_NAME"].ToString();
                        str["sz_chart_number"]     = dataSet1.Tables[0].Rows[k]["sz_chart_number"].ToString();
                        str["i_rfo_chart_no"]      = dataSet1.Tables[0].Rows[k]["i_rfo_chart_no"].ToString();
                        str["SZ_CASE_TYPE_NAME"]   = dataSet1.Tables[0].Rows[k]["SZ_CASE_TYPE_NAME"].ToString();
                        str["DT_CREATED_DATE"]     = dataSet1.Tables[0].Rows[k]["DT_CREATED_DATE"].ToString();
                        dataTable.Rows.Add(str);
                    }
                }
                this.grdCaseMaster.DataSource = dataTable;
                this.grdCaseMaster.DataBind();
            }
            if (this.grdCaseMaster.Items.Count > 0)
            {
                this.btnSave.Enabled = true;
                this.selectAllCheckBox();
            }
            Bill_Sys_BillingCompanyObject billSysBillingCompanyObject = (Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"];
            if (billSysBillingCompanyObject != null)
            {
                if (!billSysBillingCompanyObject.BT_REFERRING_FACILITY)
                {
                    this.grdCaseMaster.Columns[this.COL_CHART_NUMBER].Visible     = true;
                    this.grdCaseMaster.Columns[this.COL_RFO_CHART_NUMBER].Visible = false;
                }
                else
                {
                    this.grdCaseMaster.Columns[this.COL_CHART_NUMBER].Visible     = false;
                    this.grdCaseMaster.Columns[this.COL_RFO_CHART_NUMBER].Visible = 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);
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }