protected void DDLDiagnosis_SelectedIndexChanged(object sender, EventArgs e)
    {
        lblmsg.Visible = false;
        string selected_item = DDLDiagnosis.SelectedItem.Value.ToString();

        Bill_Sys_Settings obj = new Bill_Sys_Settings();
        DataSet           ds  = new DataSet();

        ds = obj.GetDoctorNotes(selected_item, Company_id);
        grdDoctorNotes.DataSource = ds;
        grdDoctorNotes.DataBind();

        for (int i = 0; i < grdDoctorNotes.VisibleRowCount; i++)
        {
            string speciality = selected_item;


            //string speciality =  obj.GetSpeciality(selected_item, Company_id);

            GridViewDataColumn c        = (GridViewDataColumn)grdDoctorNotes.Columns[0];
            CheckBox           checkBox = (CheckBox)grdDoctorNotes.FindRowCellTemplateControl(i, c, "chkall");
            if ((ds.Tables[0].Rows[i]["i_mst_mandatory_id"].ToString() != "") && (ds.Tables[0].Rows[i]["sz_specialty_id"].ToString() == speciality))
            {
                checkBox.Checked = true;
            }
        }
        if (grdDoctorNotes.VisibleRowCount == 0)
        {
            lblmsg.Visible = true;
            lblmsg.Text    = "No record found";
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        lblmsg.Visible = false;
        //extddlSpeciality.Flag_ID = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;

        Company_id = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
        user_id    = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ID;
        if (!IsPostBack)
        {
            Bill_Sys_Settings obj = new Bill_Sys_Settings();
            DataSet           ds  = new DataSet();
            ds = obj.GetSpeciality(Company_id);
            DDLDiagnosis.DataSource = ds;
            DDLDiagnosis.DataBind();
        }
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        string selected_item1 = DDLDiagnosis.SelectedItem.Value.ToString();
        //string code;
        //string speciality = DDLDiagnosis.SelectedItem.Text;
        string            speciality = DDLDiagnosis.SelectedItem.Value.ToString();
        DataSet           ds         = new DataSet();
        Bill_Sys_Settings obj        = new Bill_Sys_Settings();

        for (int i = 0; i < grdDoctorNotes.VisibleRowCount; i++)
        {
            GridViewDataColumn c        = (GridViewDataColumn)grdDoctorNotes.Columns[0];
            CheckBox           checkBox = (CheckBox)grdDoctorNotes.FindRowCellTemplateControl(i, c, "chkall");//Chkbox Id name
            if (checkBox != null)
            {
                if (checkBox.Checked)
                {
                    string id = Convert.ToString(grdDoctorNotes.GetRowValues(i, "i_txn_id"));
                    ds = obj.GetNotes(id, Company_id, user_id, selected_item1);
                }
                else
                {
                    DataSet dss = new DataSet();
                    string  id  = Convert.ToString(grdDoctorNotes.GetRowValues(i, "i_txn_id"));
                    dss = obj.DeleteNodes(id, Company_id, user_id);
                }
            }
        }
        if (grdDoctorNotes.VisibleRowCount > 0)
        {
            lblmsg.Visible = true;
            lblmsg.Text    = "Your changes made to server successfully.";
        }
        //if (grdDoctorNotes.VisibleRowCount == 0)
        //{
        //    lblmsg.Visible = true;
        //    lblmsg.Text = "No record found";
        //}
    }
Example #4
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());
        }
        if (this.Session["Bit"] != null)
        {
            string text = "";
            if (this.Session["Bit"].ToString() == "1")
            {
                text = this.extddlUserLawFirm.Text;
                log.Debug("Add button click - szValue = " + text);
            }
            else if (this.Session["Bit"].ToString() == "2")
            {
                if (this.chkChartNumber.Checked)
                {
                    text = "1";
                }
                else
                {
                    text = "0";
                }
                log.Debug("Add button click - szValue = " + text);
            }
            else if (this.Session["Bit"].ToString() == "3")
            {
                text = this.extdllUserName.Text;
                log.Debug("Add button click - szValue = " + text);
            }
            else if (this.Session["Bit"].ToString() == "4")
            {
                text = this.extddlTreatmentAddress.Selected_Text;
                log.Debug("Add button click - szValue = " + text);
            }
            else if (this.Session["Bit"].ToString() == "5")
            {
                text = this.extdlPOS.Text;
                log.Debug("Add button click - szValue = " + text);
            }
            else if (this.Session["Bit"].ToString() == "6")
            {
                string szreturn = GetIniEval();
                if (szreturn != "0")
                {
                    this.usrMessage.PutMessage("You have Initial Evaluation for specialty so you can't set default visit type ");
                    usrMessage.SetMessageType(UserControl_ErrorMessageControl.DisplayType.Type_ErrorMessage);
                    this.usrMessage.Show();
                    return;
                }

                if (this.chkChartNumber.Checked)
                {
                    text = "1";
                }
                else
                {
                    text = "0";
                }
                log.Debug("Add button click - szValue = " + text);
            }
            else if (this.Session["Bit"].ToString() == "0")
            {
                text = this.txtSystemKeyValue.Text;
                log.Debug("Add button click - szValue = " + text);
                try
                {
                    Convert.ToDateTime(text + " " + this.ddlSchTime.SelectedValue.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);
                    return;
                }
            }
            Bill_Sys_Settings settings = new Bill_Sys_Settings();
            log.Debug("Give call to Save_Key_Settings method in App_code - szValue = " + text);
            int num = 0;
            if (this.Session["Bit"].ToString() == "6")
            {
                num = settings.Save_Key_Settings(this.extddlSysKeys.Text, text, this.txtCompanyID.Text, extddlVisitType.Text);
            }
            else
            {
                num = settings.Save_Key_Settings(this.extddlSysKeys.Text, text, this.txtCompanyID.Text, this.ddlSchTime.SelectedValue.ToString());
            }
            //log.Debug("Save_Key_Settings method returns - i = " + num);
            if (num != 0)
            {
                this.usrMessage.PutMessage("key added successfully.");
                usrMessage.SetMessageType(UserControl_ErrorMessageControl.DisplayType.Type_UserMessage);
                this.usrMessage.Show();
                if (this.extddlSysKeys.Text == "SS00012")
                {
                    if (((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ID == text)
                    {
                        this.Session["IPAdmin"] = "True";
                    }
                    else
                    {
                        this.Session["IPAdmin"] = "False";
                    }
                }
                this.grdSettings.XGridBindSearch();
                this.SetDefaultSettigns();
            }
            else
            {
                this.usrMessage.PutMessage("key  already exists or erro in transaction");
                usrMessage.SetMessageType(UserControl_ErrorMessageControl.DisplayType.Type_ErrorMessage);
                this.usrMessage.Show();
            }
            //Method End
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
        }
    }
Example #5
0
    protected void extddlSysKeys_extendDropDown_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (this.extddlSysKeys.Text == "NA")
        {
            this.Session["Bit"] = null;
            log.Debug("Session[Bit] = null");
        }
        else
        {
            Bill_Sys_Settings objset = new Bill_Sys_Settings();
            string            str    = objset.GET_KEY_BIT(this.extddlSysKeys.Text);
            if (str.ToLower() == "true")
            {
                if (this.extddlSysKeys.Text == "SS00060")
                {
                    this.Session["Bit"]                 = "6";
                    this.lblSubValue.Visible            = true;
                    this.ddlSchTime.Visible             = false;
                    this.txtSystemKeyValue.Visible      = false;
                    this.chkChartNumber.Visible         = true;
                    this.extddlUserLawFirm.Visible      = false;
                    this.extdllUserName.Visible         = false;
                    this.extdlLDateFormate.Visible      = false;
                    this.extddlTreatmentAddress.Visible = false;
                    this.extdlPOS.Visible               = false;
                    extddlVisitType.Visible             = true;
                    log.Debug("Session[Bit] = 6");
                }
                else
                {
                    this.Session["Bit"]                 = "0";
                    this.lblSubValue.Visible            = true;
                    this.ddlSchTime.Visible             = true;
                    this.txtSystemKeyValue.Visible      = true;
                    this.chkChartNumber.Visible         = false;
                    this.extddlUserLawFirm.Visible      = false;
                    this.extdlLDateFormate.Visible      = false;
                    this.extdlPOS.Visible               = false;
                    this.extddlTreatmentAddress.Visible = false;
                    log.Debug("Session[Bit] = 0");
                }
            }
            else if (str.ToLower() == "false")
            {
                this.lblSubValue.Visible       = false;
                this.ddlSchTime.Visible        = false;
                this.txtSystemKeyValue.Visible = false;
                if (this.extddlSysKeys.Text == "SS00003")
                {
                    this.Session["Bit"]                 = "1";
                    this.chkChartNumber.Visible         = false;
                    this.extddlUserLawFirm.Visible      = true;
                    this.extdlLDateFormate.Visible      = false;
                    this.extddlTreatmentAddress.Visible = false;
                    this.extdlPOS.Visible               = false;
                    extddlVisitType.Visible             = false;
                    log.Debug("Session[Bit] = 1");
                }
                else if (this.extddlSysKeys.Text == "SS00012")
                {
                    this.Session["Bit"]                 = "3";
                    this.lblSubValue.Visible            = false;
                    this.ddlSchTime.Visible             = false;
                    this.txtSystemKeyValue.Visible      = false;
                    this.chkChartNumber.Visible         = false;
                    this.extddlUserLawFirm.Visible      = false;
                    this.extdllUserName.Visible         = true;
                    this.extdlPOS.Visible               = false;
                    this.extdlLDateFormate.Visible      = false;
                    this.extddlTreatmentAddress.Visible = false;
                    extddlVisitType.Visible             = false;
                    log.Debug("Session[Bit] = 3");
                }
                else if (this.extddlSysKeys.Text == "SS00013")
                {
                    this.Session["Bit"]                 = "4";
                    this.lblSubValue.Visible            = false;
                    this.ddlSchTime.Visible             = false;
                    this.txtSystemKeyValue.Visible      = false;
                    this.chkChartNumber.Visible         = false;
                    this.extddlUserLawFirm.Visible      = false;
                    this.extdllUserName.Visible         = false;
                    this.extdlLDateFormate.Visible      = false;
                    this.extddlTreatmentAddress.Visible = true;
                    this.extdlPOS.Visible               = false;
                    extddlVisitType.Visible             = false;
                    log.Debug("Session[Bit] = 4");
                }
                else if (this.extddlSysKeys.Text == "SS00010")
                {
                    this.Session["Bit"]                 = "5";
                    this.lblSubValue.Visible            = false;
                    this.ddlSchTime.Visible             = false;
                    this.txtSystemKeyValue.Visible      = false;
                    this.chkChartNumber.Visible         = false;
                    this.extddlUserLawFirm.Visible      = false;
                    this.extdllUserName.Visible         = false;
                    this.extdlLDateFormate.Visible      = false;
                    this.extddlTreatmentAddress.Visible = false;
                    this.extdlPOS.Visible               = true;
                    extddlVisitType.Visible             = false;
                    log.Debug("Session[Bit] = 5");
                }

                else
                {
                    this.Session["Bit"]                 = "2";
                    this.chkChartNumber.Visible         = true;
                    this.extddlUserLawFirm.Visible      = false;
                    this.extdlLDateFormate.Visible      = false;
                    this.extddlTreatmentAddress.Visible = false;
                    this.extdlPOS.Visible               = false;
                    extddlVisitType.Visible             = false;
                    log.Debug("Session[Bit] = 2");
                }
            }
        }
    }
Example #6
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());
        }
        string szValue = "";

        if (this.Session["Bit"].ToString() == "1")
        {
            szValue = this.extddlUserLawFirm.Text;
        }
        else if (this.Session["Bit"].ToString() == "3")
        {
            szValue = this.extdllUserName.Text;
        }
        else if (this.Session["Bit"].ToString() == "4")
        {
            szValue = this.extdlLDateFormate.Text;
            switch (szValue)
            {
            case "NA":
            case "":
                szValue = this.extddlTreatmentAddress.Selected_Text;
                break;
            }
        }
        else if (this.Session["Bit"].ToString() == "5")
        {
            szValue = this.extdlPOS.Text;
        }
        else if (this.Session["Bit"].ToString() == "6")
        {
            if (this.chkChartNumber.Checked)
            {
                szValue = "1";
            }
            else
            {
                szValue = "0";
            }
        }
        else if (this.Session["Bit"].ToString() == "2")
        {
            if (this.chkChartNumber.Checked)
            {
                szValue = "1";
            }
            else
            {
                szValue = "0";
            }
        }
        if (this.Session["Bit"].ToString() == "0")
        {
            szValue = this.txtSystemKeyValue.Text;
            try
            {
                Convert.ToDateTime(szValue + " " + this.ddlSchTime.SelectedValue.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);
                return;
            }
        }
        string            str3     = this.Session["Setting_Id"].ToString();
        Bill_Sys_Settings settings = new Bill_Sys_Settings();
        string            szsubVal = "";

        if (this.Session["Bit"].ToString() == "6")
        {
            szsubVal = extddlVisitType.Text;
        }
        else
        {
            szsubVal = this.ddlSchTime.SelectedValue.ToString();
        }

        if (settings.Update_Key_Settings(this.extddlSysKeys.Text, szValue, str3, szsubVal) == 1)
        {
            if (this.extddlSysKeys.Selected_Text == "IP Admin")
            {
                this.UpdateIPAdmin(szValue);
            }
            this.usrMessage.PutMessage("key updated successfully.");
            usrMessage.SetMessageType(UserControl_ErrorMessageControl.DisplayType.Type_UserMessage);
            this.usrMessage.Show();
            this.SetDefaultSettigns();
            if (this.extddlSysKeys.Text == "SS00012")
            {
                if (((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ID == szValue)
                {
                    this.Session["IPAdmin"] = "True";
                }
                else
                {
                    this.Session["IPAdmin"] = "False";
                }
            }
            this.grdSettings.XGridBindSearch();
        }
        else
        {
            this.usrMessage.PutMessage("key  already exists or erro in transaction");
            usrMessage.SetMessageType(UserControl_ErrorMessageControl.DisplayType.Type_ErrorMessage);
            this.usrMessage.Show();
        }
        this.btnClear_Click(sender, e);
        this.SetDefaultSettigns();
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }