コード例 #1
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());
        }
        try
        {
            if (!IsPostBack)
            {
                if (Request.QueryString["edit"] != null)
                {
                    string attorneyid = Request.QueryString["edit"].ToString();
                    divrd.Visible     = false;
                    divupdate.Visible = true;
                    Patient_TVBO _objAtrnyInfo = new Patient_TVBO();
                    DataSet      _attornyDs    = _objAtrnyInfo.GetAttornyInfo(attorneyid);
                    if (_attornyDs.Tables[0].Rows.Count > 0)
                    {
                        txtFirstname.Text = _attornyDs.Tables[0].Rows[0].ItemArray.GetValue(1).ToString();
                        txtLastname.Text  = _attornyDs.Tables[0].Rows[0].ItemArray.GetValue(2).ToString();
                        txtCity.Text      = _attornyDs.Tables[0].Rows[0].ItemArray.GetValue(3).ToString();
                        txtZip.Text       = _attornyDs.Tables[0].Rows[0].ItemArray.GetValue(5).ToString();
                        txtPhone.Text     = _attornyDs.Tables[0].Rows[0].ItemArray.GetValue(6).ToString();
                        txtFax.Text       = _attornyDs.Tables[0].Rows[0].ItemArray.GetValue(7).ToString();
                        txtEmailID.Text   = _attornyDs.Tables[0].Rows[0].ItemArray.GetValue(8).ToString();
                        txtState.Text     = _attornyDs.Tables[0].Rows[0]["SZ_ATTORNEY_STATE_ID"].ToString();
                        txtAddress.Text   = _attornyDs.Tables[0].Rows[0]["SZ_ATTORNEY_ADDRESS"].ToString();
                    }
                    hdfid.Value = attorneyid;
                }
                else if (Session["AttornyID"].ToString() != null && Session["AttornyID"].ToString() != "")
                {
                    divrd.Visible     = true;
                    divupdate.Visible = false;

                    string       szAttornyID   = Session["AttornyID"].ToString();
                    Patient_TVBO _objAtrnyInfo = new Patient_TVBO();
                    DataSet      _attornyDs    = _objAtrnyInfo.GetAttornyInfo(szAttornyID);

                    if (_attornyDs.Tables[0].Rows.Count > 0)
                    {
                        lblFirstName.Text = _attornyDs.Tables[0].Rows[0].ItemArray.GetValue(1).ToString();
                        lblLastName.Text  = _attornyDs.Tables[0].Rows[0].ItemArray.GetValue(2).ToString();
                        lblCity.Text      = _attornyDs.Tables[0].Rows[0].ItemArray.GetValue(3).ToString();
                        //    txtState.Text = _attornyDs.Tables[0].Rows[0].ItemArray.GetValue(4).ToString();
                        lblZip.Text     = _attornyDs.Tables[0].Rows[0].ItemArray.GetValue(5).ToString();
                        lblPhoneNo.Text = _attornyDs.Tables[0].Rows[0].ItemArray.GetValue(6).ToString();
                        lblFax.Text     = _attornyDs.Tables[0].Rows[0].ItemArray.GetValue(7).ToString();
                        lblEmailID.Text = _attornyDs.Tables[0].Rows[0].ItemArray.GetValue(8).ToString();
                        lblState.Text   = _attornyDs.Tables[0].Rows[0]["SZ_STATE_NAME"].ToString();
                    }
                }
                else
                {
                    divrd.Visible     = false;
                    divupdate.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);
        }


        #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_PopupAttorny.aspx");
        }
        #endregion
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
コード例 #2
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     _patient_tvbo = new Patient_TVBO();
     _patient_tvbo.Save_Attorny_User(extddlAssignAttorny.Text, extddlAttorney.Text, txtCompanyID.Text);
     grdAttornyUser.XGridBindSearch();
 }
コード例 #3
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());
        }

        try
        {
            btnSave.Attributes.Add("onclick", "return formValidator('form1','extddlDoctor,txtAppointmentDate,extddlVisitType,ddlHours,txtReDate,ddlReSchHours');");


            if (!IsPostBack)
            {
                string eventId = Request.QueryString["eventId"].ToString();
                BindTimeControl();
                txtCompanyID.Text       = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                extddlVisitType.Flag_ID = txtCompanyID.Text;
                // Set default 'C' for Visit Type
                Bill_Sys_PatientVisitBO objPV = new Bill_Sys_PatientVisitBO();
                extddlVisitType.Text = objPV.GetDefaultVisitType(txtCompanyID.Text);


                ///////////////////
                Bill_Sys_Calender _bill_Sys_Calender = new Bill_Sys_Calender();
                DataTable         dt = new DataTable();
                dt = _bill_Sys_Calender.GET_EVENT_DETAIL(eventId);
                if (dt.Rows.Count > 0)
                {
                    for (int drRow = 0; drRow <= dt.Rows.Count - 1; drRow++)
                    {
                        ddlHours.SelectedValue   = dt.Rows[drRow].ItemArray.GetValue(3).ToString().PadLeft(2, '0');
                        ddlMinutes.SelectedValue = dt.Rows[drRow].ItemArray.GetValue(1).ToString().PadLeft(2, '0');
                        ddlTime.SelectedValue    = dt.Rows[drRow].ItemArray.GetValue(5).ToString();

                        extddlDoctor.Flag_ID = dt.Rows[drRow].ItemArray.GetValue(10).ToString();
                        extddlDoctor.Text    = dt.Rows[drRow].ItemArray.GetValue(10).ToString();

                        extddlVisitType.Text = dt.Rows[drRow].ItemArray.GetValue(17).ToString();

                        txtPatientID.Text       = dt.Rows[drRow].ItemArray.GetValue(12).ToString();
                        txtAppointmentDate.Text = dt.Rows[drRow].ItemArray.GetValue(13).ToString();
                        ddlStatus.SelectedValue = dt.Rows[drRow].ItemArray.GetValue(15).ToString();
                        txtCaseID.Text          = dt.Rows[drRow].ItemArray.GetValue(16).ToString();
                        txtVisitStatus.Text     = dt.Rows[drRow].ItemArray.GetValue(15).ToString();
                        txtReEventID.Text       = dt.Rows[drRow].ItemArray.GetValue(18).ToString();
                        if (txtReEventID.Text == "" && ddlStatus.SelectedValue == "1")
                        {
                            txtReDate.Text = dt.Rows[drRow].ItemArray.GetValue(19).ToString();
                            ddlReSchHours.SelectedValue   = dt.Rows[drRow].ItemArray.GetValue(20).ToString().PadLeft(2, '0');
                            ddlReSchMinutes.SelectedValue = dt.Rows[drRow].ItemArray.GetValue(21).ToString().PadLeft(2, '0');
                            ddlReSchTime.SelectedValue    = dt.Rows[drRow].ItemArray.GetValue(22).ToString();


                            lblReDate.Visible       = true;
                            lblReTIme.Visible       = true;
                            txtReDate.Visible       = true;
                            ddlReSchHours.Visible   = true;
                            ddlReSchMinutes.Visible = true;
                            ddlReSchTime.Visible    = true;
                        }
                        if (ddlStatus.SelectedValue == "2")
                        {
                            btnSave.Visible            = true;
                            ddlHours.Enabled           = false;
                            ddlMinutes.Enabled         = false;
                            ddlTime.Enabled            = false;
                            ddlStatus.Enabled          = false;
                            extddlDoctor.Enabled       = false;
                            txtAppointmentDate.Enabled = false;
                        }

                        DataTable dtTest = _bill_Sys_Calender.GetReferringProcCodeList(((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID, extddlDoctor.Text).Tables[0];
                        ddlTestNames.DataSource     = dtTest;
                        ddlTestNames.DataTextField  = "DESCRIPTION";
                        ddlTestNames.DataValueField = "CODE";
                        ddlTestNames.DataBind();
                        ddlOldTestNames.DataSource     = dtTest;
                        ddlOldTestNames.DataTextField  = "DESCRIPTION";
                        ddlOldTestNames.DataValueField = "CODE";
                        ddlOldTestNames.DataBind();


                        // if (dt.Rows[drRow].ItemArray.GetValue(14).ToString() == "True" || ddlStatus.SelectedValue=="2" )
                        // {
                        //btnUpdate.Visible = true;
                        DataSet      ds            = new DataSet();
                        Patient_TVBO _patient_TVBO = new Patient_TVBO();
                        ds = _patient_TVBO.GetAppointProcCode(Convert.ToInt32(eventId));
                        foreach (DataRow dr in ds.Tables[0].Rows)
                        {
                            foreach (ListItem lst in ddlTestNames.Items)
                            {
                                if (lst.Value == dr.ItemArray.GetValue(0).ToString())
                                {
                                    lst.Selected = true;
                                }
                            }
                            foreach (ListItem lst in ddlOldTestNames.Items)
                            {
                                if (lst.Value == dr.ItemArray.GetValue(0).ToString())
                                {
                                    lst.Selected = true;
                                }
                            }
                        }
                        //}
                    }
                    ////////////////////
                }
            }
            lblMsg.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());
        }
    }