示例#1
0
    public string SaveUI_Ajax()
    {
        string ieMode    = "New";
        string ieID      = Session["PatientIE_ID"].ToString();
        bool   bpChecked = true;
        // string result=  SaveUI(Session["PatientIE_ID"].ToString(), ieMode, true);
        long   _ieID   = Convert.ToInt64(ieID);
        string _ieMode = "";

        string sProvider = ConfigurationManager.ConnectionStrings["connString_V3"].ConnectionString;
        string SqlStr    = "";

        oSQLConn.ConnectionString = sProvider;
        oSQLConn.Open();
        SqlStr = "Select * from tblbpNeck WHERE PatientIE_ID = " + ieID;
        SqlDataAdapter    sqlAdapt      = new SqlDataAdapter(SqlStr, oSQLConn);
        SqlCommandBuilder sqlCmdBuilder = new SqlCommandBuilder(sqlAdapt);
        DataTable         sqlTbl        = new DataTable();

        sqlAdapt.Fill(sqlTbl);
        DataRow TblRow;

        if (sqlTbl.Rows.Count == 0 && bpChecked == true)
        {
            _ieMode = "New";
        }
        else if (sqlTbl.Rows.Count == 0 && bpChecked == false)
        {
            _ieMode = "None";
        }
        else if (sqlTbl.Rows.Count > 0 && bpChecked == false)
        {
            _ieMode = "Delete";
        }
        else
        {
            _ieMode = "Update";
        }

        if (_ieMode == "New")
        {
            TblRow = sqlTbl.NewRow();
        }
        else if (_ieMode == "Update" || _ieMode == "Delete")
        {
            TblRow = sqlTbl.Rows[0];
            TblRow.AcceptChanges();
        }
        else
        {
            TblRow = null;
        }

        if (_ieMode == "Update" || _ieMode == "New")
        {
            TblRow["PatientIE_ID"] = _ieID;

            //TblRow["FreeForm"] = txtFreeForm.Text.ToString();
            //TblRow["FreeFormCC"] = txtFreeFormCC.Text.ToString();
            TblRow["FreeFormA"]        = txtFreeFormA.Text.ToString().Trim().Replace("      ", string.Empty);
            TblRow["FreeFormP"]        = txtFreeFormP.Text.ToString();
            TblRow["Xrays"]            = false; //TBD
            TblRow["TPEpidular"]       = false; //TBD
            TblRow["NoOfTPInjections"] = "";    // txtPainScale;
            TblRow["ScheduleEpidural"] = false; //txtPainScale;
            TblRow["NewMBB"]           = false; // txtPainScale;
            TblRow["SPTPMBB"]          = false; //txtPainScale;
            TblRow["ISFirst"]          = true;



            if (_ieMode == "New")
            {
                TblRow["CreatedBy"]   = "Admin";
                TblRow["CreatedDate"] = DateTime.Now;
                sqlTbl.Rows.Add(TblRow);
            }
            sqlAdapt.Update(sqlTbl);
        }
        else if (_ieMode == "Delete")
        {
            TblRow.Delete();
            sqlAdapt.Update(sqlTbl);
        }
        if (TblRow != null)
        {
            TblRow.Table.Dispose();
        }
        sqlTbl.Dispose();
        sqlCmdBuilder.Dispose();
        sqlAdapt.Dispose();
        oSQLConn.Close();

        if (_ieMode == "New")
        {
            return("Neck has been added...");
        }
        else if (_ieMode == "Update")
        {
            return("Neck has been updated...");
        }
        else if (_ieMode == "Delete")
        {
            return("Neck has been deleted...");
        }
        else
        {
            return("");
        }
    }
示例#2
0
    public void SaveStdUI(string ieID, string iStdID, string heading, string pdesc)
    {
        string[] _Type  = iStdID.Split('_');
        int      _StdID = Convert.ToInt32(_Type[0]);
        string   Part   = Convert.ToString(_Type[1]);

        string _ieMode = "";
        long   _ieID   = Convert.ToInt64(ieID);
        //long _StdID = Convert.ToInt64(iStdID);
        string sProvider = ConfigurationManager.ConnectionStrings["connString_V3"].ConnectionString;
        string SqlStr    = "";

        oSQLConn.ConnectionString = sProvider;
        oSQLConn.Open();
        SqlStr = "Select * from tblProceduresDetail WHERE PatientIE_ID = " + ieID + " AND ProcedureDetail_ID = " + _StdID;
        SqlDataAdapter    sqlAdapt      = new SqlDataAdapter(SqlStr, oSQLConn);
        SqlCommandBuilder sqlCmdBuilder = new SqlCommandBuilder(sqlAdapt);
        DataTable         sqlTbl        = new DataTable();

        sqlAdapt.Fill(sqlTbl);
        DataRow TblRow;

        //if (sqlTbl.Rows.Count == 0 && StdChecked == true)
        //    _ieMode = "New";
        //else if (sqlTbl.Rows.Count == 0 && StdChecked == false)
        //    _ieMode = "None";
        //else if (sqlTbl.Rows.Count > 0 && StdChecked == false)
        //    _ieMode = "Delete";
        //else
        _ieMode = "Update";

        if (_ieMode == "New")
        {
            TblRow = sqlTbl.NewRow();
        }
        else if (_ieMode == "Update" || _ieMode == "Delete")
        {
            TblRow = sqlTbl.Rows[0];
            TblRow.AcceptChanges();
        }
        else
        {
            TblRow = null;
        }

        if (_ieMode == "Update" || _ieMode == "New")
        {
            TblRow["ProcedureDetail_ID"] = _StdID;
            TblRow["PatientIE_ID"]       = _ieID;

            if (Part.Equals("R"))
            {
                TblRow["Heading"] = heading.ToString().Trim();
                TblRow["PDesc"]   = pdesc.ToString().Trim();
            }
            else if (Part.Equals("S"))
            {
                TblRow["S_Heading"] = heading.ToString().Trim();
                TblRow["S_PDesc"]   = pdesc.ToString().Trim();
            }
            else if (Part.Equals("E"))
            {
                TblRow["E_Heading"] = heading.ToString().Trim();
                TblRow["E_PDesc"]   = pdesc.ToString().Trim();
            }

            if (_ieMode == "New")
            {
                TblRow["CreatedBy"]   = "Admin";
                TblRow["CreatedDate"] = DateTime.Now;
                sqlTbl.Rows.Add(TblRow);
            }
            sqlAdapt.Update(sqlTbl);
        }
        else if (_ieMode == "Delete")
        {
            TblRow.Delete();
            sqlAdapt.Update(sqlTbl);
        }
        if (TblRow != null)
        {
            TblRow.Table.Dispose();
        }
        sqlTbl.Dispose();
        sqlCmdBuilder.Dispose();
        sqlAdapt.Dispose();
        oSQLConn.Close();
    }
示例#3
0
    public void SaveDiagUI(string ieID, string iDiagID, bool DiagChecked, string bp, string dcd, string dc)
    {
        string _ieMode   = "";
        long   _ieID     = Convert.ToInt64(ieID);
        long   _DiagID   = Convert.ToInt64(iDiagID);
        string sProvider = ConfigurationManager.ConnectionStrings["connString_V3"].ConnectionString;
        string SqlStr    = "";

        oSQLConn.ConnectionString = sProvider;
        oSQLConn.Open();
        SqlStr = "Select * FROM tblDiagCodesDetail WHERE PatientIE_ID = " + ieID + " AND Diag_Master_ID = " + _DiagID + " AND PatientFu_ID=" + Session["patientFUId"].ToString() + " and BodyPart like '%" + _CurBP + "%' ";
        SqlDataAdapter    sqlAdapt      = new SqlDataAdapter(SqlStr, oSQLConn);
        SqlCommandBuilder sqlCmdBuilder = new SqlCommandBuilder(sqlAdapt);
        DataTable         sqlTbl        = new DataTable();

        sqlAdapt.Fill(sqlTbl);
        DataRow TblRow;

        if (sqlTbl.Rows.Count == 0 && DiagChecked == true)
        {
            _ieMode = "New";
        }
        else if (sqlTbl.Rows.Count == 0 && DiagChecked == false)
        {
            _ieMode = "None";
        }
        else if (sqlTbl.Rows.Count > 0 && DiagChecked == false)
        {
            _ieMode = "Delete";
        }
        else
        {
            _ieMode = "Update";
        }

        if (_ieMode == "New")
        {
            TblRow = sqlTbl.NewRow();
        }
        else if (_ieMode == "Update" || _ieMode == "Delete")
        {
            TblRow = sqlTbl.Rows[0];
            TblRow.AcceptChanges();
        }
        else
        {
            TblRow = null;
        }

        if (_ieMode == "Update" || _ieMode == "New")
        {
            TblRow["Diag_Master_ID"] = _DiagID;
            TblRow["PatientIE_ID"]   = _ieID;
            TblRow["PatientFU_ID"]   = Session["patientFUId"].ToString();
            TblRow["BodyPart"]       = bp.ToString().Trim();
            TblRow["DiagCode"]       = dc.ToString().Trim();
            TblRow["Description"]    = dcd.ToString().Trim();

            if (_ieMode == "New")
            {
                TblRow["CreatedBy"]   = "Admin";
                TblRow["CreatedDate"] = DateTime.Now;
                sqlTbl.Rows.Add(TblRow);
            }
            sqlAdapt.Update(sqlTbl);
        }
        else if (_ieMode == "Delete")
        {
            TblRow.Delete();
            sqlAdapt.Update(sqlTbl);
        }
        if (TblRow != null)
        {
            TblRow.Table.Dispose();
        }
        sqlTbl.Dispose();
        sqlCmdBuilder.Dispose();
        sqlAdapt.Dispose();
        oSQLConn.Close();
    }
示例#4
0
    public string SaveUI(string ieID, string ieMode, bool bpIsChecked)
    {
        long   _ieID     = Convert.ToInt64(ieID);
        string _ieMode   = "";
        string sProvider = ConfigurationManager.ConnectionStrings["connString_V3"].ConnectionString;
        string SqlStr    = "";

        oSQLConn.ConnectionString = sProvider;
        oSQLConn.Open();
        SqlStr = "Select * from tblbpElbow WHERE PatientIE_ID = " + ieID;
        SqlDataAdapter    sqlAdapt      = new SqlDataAdapter(SqlStr, oSQLConn);
        SqlCommandBuilder sqlCmdBuilder = new SqlCommandBuilder(sqlAdapt);
        DataTable         sqlTbl        = new DataTable();

        sqlAdapt.Fill(sqlTbl);
        DataRow TblRow;

        if (sqlTbl.Rows.Count == 0 && bpIsChecked == true)
        {
            _ieMode = "New";
        }
        else if (sqlTbl.Rows.Count == 0 && bpIsChecked == false)
        {
            _ieMode = "None";
        }
        else if (sqlTbl.Rows.Count > 0 && bpIsChecked == false)
        {
            _ieMode = "Delete";
        }
        else
        {
            _ieMode = "Update";
        }

        if (_ieMode == "New")
        {
            TblRow = sqlTbl.NewRow();
        }
        else if (_ieMode == "Update" || _ieMode == "Delete")
        {
            TblRow = sqlTbl.Rows[0];
            TblRow.AcceptChanges();
        }
        else
        {
            TblRow = null;
        }

        if (_ieMode == "Update" || _ieMode == "New")
        {
            TblRow["PatientIE_ID"] = _ieID;

            TblRow["ExtensionROM1"] = txtExtension1.Text.Trim();
            TblRow["ExtensionROM2"] = txtExtension2.Text.Trim();

            TblRow["FlexionROM1"] = txtFlex1.Text.Trim();
            TblRow["FlexionROM2"] = txtFlex2.Text.Trim();

            TblRow["FlexionROMNormal"]    = txtFlex3.Text.Trim();
            TblRow["ExtensionROMNormal"]  = txtExtension3.Text.Trim();
            TblRow["SupinationROMNormal"] = txtSupination3.Text.Trim();
            TblRow["PronationROMNormal"]  = txtPronation3.Text.Trim();

            TblRow["SupinationROM1"] = txtSupination1.Text.Trim();
            TblRow["SupinationROM2"] = txtSupination2.Text.Trim();
            TblRow["PronationROM1"]  = txtPronation1.Text.Trim();
            TblRow["PronationROM2"]  = txtPronation2.Text.Trim();

            TblRow["FreeFormA"] = txtFreeFormA.Text.ToString();
            TblRow["FreeFormP"] = txtFreeFormP.Text.ToString();
            TblRow["CCvalue"]   = hdCCvalue.Value;


            TblRow["PEvalue"] = hdPEvalue.Value;



            string strname = "", strleft = "", strright = "", strnormal = "";

            for (int i = 0; i < repROM.Items.Count; i++)
            {
                Label   lblname   = repROM.Items[i].FindControl("lblname") as Label;
                TextBox txtleft   = repROM.Items[i].FindControl("txtleft") as TextBox;
                TextBox txtright  = repROM.Items[i].FindControl("txtright") as TextBox;
                TextBox txtnormal = repROM.Items[i].FindControl("txtnormal") as TextBox;

                strname   = strname + "," + lblname.Text;
                strleft   = strleft + "," + txtleft.Text;
                strright  = strright + "," + txtright.Text;
                strnormal = strnormal + "," + txtnormal.Text;
            }

            TblRow["LeftROM"]   = strleft.Substring(1);
            TblRow["RightROM"]  = strright.Substring(1);
            TblRow["NormalROM"] = strnormal.Substring(1);
            TblRow["NameROM"]   = strname.Substring(1);


            if (_ieMode == "New")
            {
                TblRow["CreatedBy"]   = "Admin";
                TblRow["CreatedDate"] = DateTime.Now;
                sqlTbl.Rows.Add(TblRow);
            }
            sqlAdapt.Update(sqlTbl);
        }
        else if (_ieMode == "Delete")
        {
            TblRow.Delete();
            sqlAdapt.Update(sqlTbl);
        }
        if (TblRow != null)
        {
            TblRow.Table.Dispose();
        }
        sqlTbl.Dispose();
        sqlCmdBuilder.Dispose();
        sqlAdapt.Dispose();
        oSQLConn.Close();
        if (pageHDN.Value != null && pageHDN.Value != "")
        {
            Response.Redirect(pageHDN.Value.ToString());
        }
        if (_ieMode == "New")
        {
            return("Elbow has been added...");
        }
        else if (_ieMode == "Update")
        {
            return("Elbow has been updated...");
        }
        else if (_ieMode == "Delete")
        {
            return("Elbow has been deleted...");
        }
        else
        {
            return("");
        }
    }
示例#5
0
    public string SaveUI(string ieID, string fuID, string fuMode, bool bpIsChecked)
    {
        long   _fuID   = Convert.ToInt64(fuID);
        string _fuMode = "";

        string sProvider = System.Configuration.ConfigurationManager.ConnectionStrings["connString_V3"].ConnectionString;
        string SqlStr    = "";

        oSQLConn.ConnectionString = sProvider;
        oSQLConn.Open();
        SqlStr = "Select * from tblFUbpNeck WHERE PatientFU_ID = " + _fuID;
        SqlDataAdapter    sqlAdapt      = new SqlDataAdapter(SqlStr, oSQLConn);
        SqlCommandBuilder sqlCmdBuilder = new SqlCommandBuilder(sqlAdapt);
        DataTable         sqlTbl        = new DataTable();

        sqlAdapt.Fill(sqlTbl);
        DataRow TblRow;

        if (sqlTbl.Rows.Count == 0 && bpIsChecked == true)
        {
            _fuMode = "New";
        }
        else if (sqlTbl.Rows.Count == 0 && bpIsChecked == false)
        {
            _fuMode = "None";
        }
        else if (sqlTbl.Rows.Count > 0 && bpIsChecked == false)
        {
            _fuMode = "Delete";
        }
        else
        {
            _fuMode = "Update";
        }

        if (_fuMode == "New")
        {
            TblRow = sqlTbl.NewRow();
        }
        else if (_fuMode == "Update" || _fuMode == "Delete")
        {
            TblRow = sqlTbl.Rows[0];
            TblRow.AcceptChanges();
        }
        else
        {
            TblRow = null;
        }

        if (_fuMode == "Update" || _fuMode == "New")
        {
            TblRow["PatientFU_ID"] = _fuID;

            //TblRow["FreeForm"] = txtFreeForm.Text.ToString();
            //TblRow["FreeFormCC"] = txtFreeFormCC.Text.ToString();
            TblRow["FreeFormA"]        = txtFreeFormA.Text.ToString().Trim().Replace("      ", string.Empty);
            TblRow["FreeFormP"]        = txtFreeFormP.Text.ToString();
            TblRow["Xrays"]            = false; //TBD
            TblRow["TPEpidular"]       = false; //TBD
            TblRow["NoOfTPInjections"] = "";    // txtPainScale;
            TblRow["ScheduleEpidural"] = false; //txtPainScale;
            TblRow["NewMBB"]           = false; // txtPainScale;
            TblRow["SPTPMBB"]          = false; //txtPainScale;

            TblRow["CCvalue"] = hdCCvalue.Value;

            TblRow["PEvalue"]         = hdPEvalue.Value;
            TblRow["PEvalueoriginal"] = hdPEvalueoriginal.Value;

            TblRow["PESides"]     = hdPESides.Value;
            TblRow["PESidesText"] = hdPESidesText.Value;

            string strname = "", strleft = "", strright = "", strnormal = "", strcname = "", strcrom = "", strcnormal = "";

            for (int i = 0; i < repROM.Items.Count; i++)
            {
                Label   lblname   = repROM.Items[i].FindControl("lblname") as Label;
                TextBox txtleft   = repROM.Items[i].FindControl("txtleft") as TextBox;
                TextBox txtright  = repROM.Items[i].FindControl("txtright") as TextBox;
                TextBox txtnormal = repROM.Items[i].FindControl("txtnormal") as TextBox;

                strname   = strname + "," + lblname.Text;
                strleft   = strleft + "," + txtleft.Text;
                strright  = strright + "," + txtright.Text;
                strnormal = strnormal + "," + txtnormal.Text;
            }

            TblRow["LeftROM"]   = strleft.Substring(1);
            TblRow["RightROM"]  = strright.Substring(1);
            TblRow["NormalROM"] = strnormal.Substring(1);
            TblRow["NameROM"]   = strname.Substring(1);


            for (int i = 0; i < repROMCervical.Items.Count; i++)
            {
                Label   lblname   = repROMCervical.Items[i].FindControl("lblname") as Label;
                TextBox txtrom    = repROMCervical.Items[i].FindControl("txtrom") as TextBox;
                TextBox txtnormal = repROMCervical.Items[i].FindControl("txtnormal") as TextBox;

                strcname   = strcname + "," + lblname.Text;
                strcrom    = strcrom + "," + txtrom.Text;
                strcnormal = strcnormal + "," + txtnormal.Text;
            }

            if (!string.IsNullOrEmpty(strcname))
            {
                TblRow["CNameROM"] = strcname.Substring(1);
            }
            if (!string.IsNullOrEmpty(strcrom))
            {
                TblRow["CROM"] = strcrom.Substring(1);
            }
            if (!string.IsNullOrEmpty(strcnormal))
            {
                TblRow["CNormalROM"] = strcnormal.Substring(1);
            }



            if (_fuMode == "New")
            {
                TblRow["CreatedBy"]   = "Admin";
                TblRow["CreatedDate"] = DateTime.Now;
                sqlTbl.Rows.Add(TblRow);
            }
            sqlAdapt.Update(sqlTbl);
        }
        else if (_fuMode == "Delete")
        {
            TblRow.Delete();
            sqlAdapt.Update(sqlTbl);
        }
        if (TblRow != null)
        {
            TblRow.Table.Dispose();
        }
        sqlTbl.Dispose();
        sqlCmdBuilder.Dispose();
        sqlAdapt.Dispose();
        oSQLConn.Close();

        if (_fuMode == "New")
        {
            return("Neck has been added...");
        }
        else if (_fuMode == "Update")
        {
            return("Neck has been updated...");
        }
        else if (_fuMode == "Delete")
        {
            return("Neck has been deleted...");
        }
        else
        {
            return("");
        }
    }
    public string SaveUI(string fuID, string ieMode, bool bpIsChecked)
    {
        _CurIEid = Session["PatientIE_ID2"].ToString();
        _FuId    = Session["patientFUId"].ToString();
        long   _fuID   = Convert.ToInt64(_FuId);
        string _fuMode = "";

        string sProvider = ConfigurationManager.ConnectionStrings["connString_V3"].ConnectionString;
        string SqlStr    = "";

        oSQLConn.ConnectionString = sProvider;
        oSQLConn.Open();
        SqlStr = "Select * from tblFUbpOtherPart WHERE PatientFU_ID = " + _fuID;
        SqlDataAdapter    sqlAdapt      = new SqlDataAdapter(SqlStr, oSQLConn);
        SqlCommandBuilder sqlCmdBuilder = new SqlCommandBuilder(sqlAdapt);
        DataTable         sqlTbl        = new DataTable();

        sqlAdapt.Fill(sqlTbl);
        DataRow TblRow;

        if (sqlTbl.Rows.Count == 0 && bpIsChecked == true)
        {
            _fuMode = "New";
        }
        else if (sqlTbl.Rows.Count == 0 && bpIsChecked == false)
        {
            _fuMode = "None";
        }
        else if (sqlTbl.Rows.Count > 0 && bpIsChecked == false)
        {
            _fuMode = "Delete";
        }
        else
        {
            _fuMode = "Update";
        }

        if (_fuMode == "New")
        {
            TblRow = sqlTbl.NewRow();
        }
        else if (_fuMode == "Update" || _fuMode == "Delete")
        {
            TblRow = sqlTbl.Rows[0];
            TblRow.AcceptChanges();
        }
        else
        {
            TblRow = null;
        }

        if (_fuMode == "Update" || _fuMode == "New")
        {
            TblRow["PatientFU_ID"]          = _fuID;
            TblRow["OthersCC"]              = txtOthersCC.Text.ToString();
            TblRow["OthersPE"]              = txtOthersPE.Text.ToString();
            TblRow["OthersA"]               = txtOthersA.Text.ToString();
            TblRow["OthersP"]               = txtOthersP.Text.ToString();
            TblRow["RecommandationDetails"] = Request.Form[txtTreatmentParagraph.UniqueID];
            TblRow["RecommandationDelimit"] = bindTeratMentPrintvalue();
            TblRow["PONDetails"]            = Request.Form[txtPONDetails.UniqueID];
            TblRow["PONDelimit"]            = bindPONPrintValue();
            TblRow["PONPrint"]              = ViewState["PONPrint"].ToString();


            if (_fuMode == "New")
            {
                TblRow["CreatedBy"]   = "Admin";
                TblRow["CreatedDate"] = DateTime.Now;
                sqlTbl.Rows.Add(TblRow);
            }
            sqlAdapt.Update(sqlTbl);
        }
        else if (_fuMode == "Delete")
        {
            TblRow.Delete();
            sqlAdapt.Update(sqlTbl);
        }
        if (TblRow != null)
        {
            TblRow.Table.Dispose();
        }
        sqlTbl.Dispose();
        sqlCmdBuilder.Dispose();
        sqlAdapt.Dispose();
        oSQLConn.Close();

        if (_fuMode == "New")
        {
            return("other part has been added...");
        }
        else if (_fuMode == "Update")
        {
            return("other part has been updated...");
        }
        else if (_fuMode == "Delete")
        {
            return("other part has been deleted...");
        }
        else
        {
            return("");
        }
    }
示例#7
0
    public string SaveUI(string fuID, string ieMode, bool bpChecked)
    {
        long   _fuID     = Convert.ToInt64(fuID);
        string _ieMode   = "";
        string sProvider = ConfigurationManager.ConnectionStrings["connString_V3"].ConnectionString;
        string SqlStr    = "";

        oSQLConn.ConnectionString = sProvider;
        oSQLConn.Open();
        SqlStr = "Select * from tblFUbpMidBack WHERE PatientFU_ID = " + _fuID;
        SqlDataAdapter    sqlAdapt      = new SqlDataAdapter(SqlStr, oSQLConn);
        SqlCommandBuilder sqlCmdBuilder = new SqlCommandBuilder(sqlAdapt);
        DataTable         sqlTbl        = new DataTable();

        sqlAdapt.Fill(sqlTbl);
        DataRow TblRow;

        if (sqlTbl.Rows.Count == 0 && bpChecked == true)
        {
            _ieMode = "New";
        }
        else if (sqlTbl.Rows.Count == 0 && bpChecked == false)
        {
            _ieMode = "None";
        }
        else if (sqlTbl.Rows.Count > 0 && bpChecked == false)
        {
            _ieMode = "Delete";
        }
        else
        {
            _ieMode = "Update";
        }

        if (_ieMode == "New")
        {
            TblRow = sqlTbl.NewRow();
        }
        else if (_ieMode == "Update" || _ieMode == "Delete")
        {
            TblRow = sqlTbl.Rows[0];
            TblRow.AcceptChanges();
        }
        else
        {
            TblRow = null;
        }

        if (_ieMode == "Update" || _ieMode == "New")
        {
            TblRow["PatientFU_ID"] = _fuID;

            //TblRow["PalpationAt"] = txtPalpationAt.Text.ToString();
            //TblRow["Levels"] = cboLevels.Text.ToString();
            //TblRow["ROM"] = cboROM.Text.ToString();
            //TblRow["TPSide1"] = cboTPSide1.Text.ToString();
            //TblRow["TPText1"] = txtTPText1.Text.ToString();
            //TblRow["TPSide2"] = cboTPSide2.Text.ToString();
            //TblRow["TPText2"] = txtTPText2.Text.ToString();
            //TblRow["TPSide3"] = cboTPSide3.Text.ToString();
            //TblRow["TPText3"] = txtTPText3.Text.ToString();
            //TblRow["TPSide4"] = cboTPSide4.Text.ToString();
            //TblRow["TPText4"] = txtTPText4.Text.ToString();
            TblRow["FreeForm"] = txtFreeForm.Text.ToString();
            //TblRow["FreeFormCC"] = txtFreeFormCC.Text.ToString();
            TblRow["FreeFormA"] = txtFreeFormA.Text.ToString();
            //TblRow["FreeFormP"] = txtFreeFormP.Text.ToString();
            TblRow["CCvalue"] = hdCCvalue.Value;


            TblRow["PEvalue"]         = hdPEvalue.Value;
            TblRow["PEvalueoriginal"] = hdPEvalueoriginal.Value;
            TblRow["PESides"]         = hdPESides.Value;
            TblRow["PESidesText"]     = hdPESidesText.Value;

            if (_ieMode == "New")
            {
                TblRow["CreatedBy"]   = "Admin";
                TblRow["CreatedDate"] = DateTime.Now;
                sqlTbl.Rows.Add(TblRow);
            }
            sqlAdapt.Update(sqlTbl);
        }
        else if (_ieMode == "Delete")
        {
            TblRow.Delete();
            sqlAdapt.Update(sqlTbl);
        }
        if (TblRow != null)
        {
            TblRow.Table.Dispose();
        }
        sqlTbl.Dispose();
        sqlCmdBuilder.Dispose();
        sqlAdapt.Dispose();
        oSQLConn.Close();

        if (_ieMode == "New")
        {
            return("MidBack has been added...");
        }
        else if (_ieMode == "Update")
        {
            return("MidBack has been updated...");
        }
        else if (_ieMode == "Delete")
        {
            return("MidBack has been deleted...");
        }
        else
        {
            return("");
        }
    }
    public void SaveStdUI(string ieID, string iStdID, bool StdIsChecked, string bp, string shd, string scc, string spe, string sa, string sp, bool bcf, bool bpn)
    {
        string _ieMode   = "";
        long   _ieID     = Convert.ToInt64(ieID);
        long   _StdID    = Convert.ToInt64(iStdID);
        string sProvider = ConfigurationManager.ConnectionStrings["connString_V3"].ConnectionString;
        string SqlStr    = "";

        oSQLConn.ConnectionString = sProvider;
        oSQLConn.Open();
        SqlStr = "Select * from tblMacros WHERE PatientIE_ID = " + ieID + " AND Macro_Master_ID = " + _StdID;
        SqlDataAdapter    sqlAdapt      = new SqlDataAdapter(SqlStr, oSQLConn);
        SqlCommandBuilder sqlCmdBuilder = new SqlCommandBuilder(sqlAdapt);
        DataTable         sqlTbl        = new DataTable();

        sqlAdapt.Fill(sqlTbl);
        DataRow TblRow;

        if (sqlTbl.Rows.Count == 0 && StdIsChecked == true)
        {
            _ieMode = "New";
        }
        else if (sqlTbl.Rows.Count == 0 && StdIsChecked == false)
        {
            _ieMode = "None";
        }
        else if (sqlTbl.Rows.Count > 0 && StdIsChecked == false)
        {
            _ieMode = "Delete";
        }
        else
        {
            _ieMode = "Update";
        }

        if (_ieMode == "New")
        {
            TblRow = sqlTbl.NewRow();
        }
        else if (_ieMode == "Update" || _ieMode == "Delete")
        {
            TblRow = sqlTbl.Rows[0];
            TblRow.AcceptChanges();
        }
        else
        {
            TblRow = null;
        }

        if (_ieMode == "Update" || _ieMode == "New")
        {
            TblRow["Macro_Master_ID"] = _StdID;
            TblRow["PatientIE_ID"]    = _ieID;
            TblRow["BodayParts"]      = bp.ToString().Trim();
            TblRow["Heading"]         = shd.ToString().Trim();
            TblRow["CCDesc"]          = scc.ToString().Trim();
            TblRow["PEDesc"]          = spe.ToString().Trim();
            TblRow["ADesc"]           = sa.ToString().Trim();
            TblRow["PDesc"]           = sp.ToString().Trim();
            TblRow["CF"] = bcf;
            TblRow["PN"] = bpn;

            if (_ieMode == "New")
            {
                TblRow["CreatedBy"]   = "Admin";
                TblRow["CreatedDate"] = DateTime.Now;
                sqlTbl.Rows.Add(TblRow);
            }
            sqlAdapt.Update(sqlTbl);
        }
        else if (_ieMode == "Delete")
        {
            TblRow.Delete();
            sqlAdapt.Update(sqlTbl);
        }
        if (TblRow != null)
        {
            TblRow.Table.Dispose();
        }
        sqlTbl.Dispose();
        sqlCmdBuilder.Dispose();
        sqlAdapt.Dispose();
        oSQLConn.Close();
    }
示例#9
0
    public void SaveMediUI(string ieID, string iMediID, bool MediIsChecked, string medi)
    {
        try
        {
            string _ieMode   = "";
            long   _ieID     = Convert.ToInt64(ieID);
            long   _MediID   = Convert.ToInt64(iMediID);
            string sProvider = ConfigurationManager.ConnectionStrings["connString_V3"].ConnectionString;
            string SqlStr    = "";
            oSQLConn.ConnectionString = sProvider;
            oSQLConn.Open();
            SqlStr = "Select * FROM tblMedicationRx WHERE PatientIE_ID = " + ieID + " AND MedicationID = " + _MediID;
            SqlDataAdapter    sqlAdapt      = new SqlDataAdapter(SqlStr, oSQLConn);
            SqlCommandBuilder sqlCmdBuilder = new SqlCommandBuilder(sqlAdapt);
            DataTable         sqlTbl        = new DataTable();
            sqlAdapt.Fill(sqlTbl);
            DataRow TblRow;

            if (sqlTbl.Rows.Count == 0 && MediIsChecked == true)
            {
                _ieMode = "New";
            }
            else if (sqlTbl.Rows.Count == 0 && MediIsChecked == false)
            {
                _ieMode = "None";
            }
            else if (sqlTbl.Rows.Count > 0 && MediIsChecked == false)
            {
                _ieMode = "Delete";
            }
            else
            {
                _ieMode = "Update";
            }

            if (_ieMode == "New")
            {
                TblRow = sqlTbl.NewRow();
            }
            else if (_ieMode == "Update" || _ieMode == "Delete")
            {
                TblRow = sqlTbl.Rows[0];
                TblRow.AcceptChanges();
            }
            else
            {
                TblRow = null;
            }

            if (_ieMode == "Update" || _ieMode == "New")
            {
                TblRow["MedicationID"] = _MediID;
                TblRow["PatientIE_ID"] = _ieID;
                TblRow["Medicine"]     = medi.ToString().Trim();

                if (_ieMode == "New")
                {
                    TblRow["UpdatedBy"]       = "Admin";
                    TblRow["UpdatedDateTime"] = DateTime.Now;
                    sqlTbl.Rows.Add(TblRow);
                }
                sqlAdapt.Update(sqlTbl);
            }
            else if (_ieMode == "Delete")
            {
                TblRow.Delete();
                sqlAdapt.Update(sqlTbl);
            }
            if (TblRow != null)
            {
                TblRow.Table.Dispose();
            }
            sqlTbl.Dispose();
            sqlCmdBuilder.Dispose();
            sqlAdapt.Dispose();
            oSQLConn.Close();
        }
        catch (Exception ex)
        {
            log.Error(ex.Message);
        }
    }
示例#10
0
    public string SaveUI(string ieID, string ieMode, bool bpChecked)
    {
        try
        {
            long   _ieID     = Convert.ToInt64(ieID);
            string _ieMode   = "";
            string sProvider = ConfigurationManager.ConnectionStrings["connString_V3"].ConnectionString;
            string SqlStr    = "";
            oSQLConn.ConnectionString = sProvider;
            oSQLConn.Open();
            SqlStr = "Select * from tblbpMidBack WHERE PatientIE_ID = " + ieID;
            SqlDataAdapter    sqlAdapt      = new SqlDataAdapter(SqlStr, oSQLConn);
            SqlCommandBuilder sqlCmdBuilder = new SqlCommandBuilder(sqlAdapt);
            DataTable         sqlTbl        = new DataTable();
            sqlAdapt.Fill(sqlTbl);
            DataRow TblRow;

            if (sqlTbl.Rows.Count == 0 && bpChecked == true)
            {
                _ieMode = "New";
            }
            else if (sqlTbl.Rows.Count == 0 && bpChecked == false)
            {
                _ieMode = "None";
            }
            else if (sqlTbl.Rows.Count > 0 && bpChecked == false)
            {
                _ieMode = "Delete";
            }
            else
            {
                _ieMode = "Update";
            }

            if (_ieMode == "New")
            {
                TblRow = sqlTbl.NewRow();
            }
            else if (_ieMode == "Update" || _ieMode == "Delete")
            {
                TblRow = sqlTbl.Rows[0];
                TblRow.AcceptChanges();
            }
            else
            {
                TblRow = null;
            }

            if (_ieMode == "Update" || _ieMode == "New")
            {
                TblRow["PatientIE_ID"] = _ieID;
                //TblRow["FreeForm"] = txtFreeForm.Text.ToString();
                //TblRow["FreeFormCC"] = txtFreeFormCC.Text.ToString();
                TblRow["FreeFormA"] = txtFreeFormA.Text.ToString();
                TblRow["FreeFormP"] = txtFreeFormP.Text.ToString();
                TblRow["CCvalue"]   = hdCCvalue.Value;



                TblRow["PEvalue"]         = hdPEvalue.Value;
                TblRow["PEvalueoriginal"] = hdPEvalueoriginal.Value;

                TblRow["PESides"]     = hdPESides.Value;
                TblRow["PESidesText"] = hdPESidesText.Value;


                if (_ieMode == "New")
                {
                    TblRow["CreatedBy"]   = "Admin";
                    TblRow["CreatedDate"] = DateTime.Now;
                    sqlTbl.Rows.Add(TblRow);
                }
                sqlAdapt.Update(sqlTbl);
            }
            else if (_ieMode == "Delete")
            {
                TblRow.Delete();
                sqlAdapt.Update(sqlTbl);
            }
            if (TblRow != null)
            {
                TblRow.Table.Dispose();
            }
            sqlTbl.Dispose();
            sqlCmdBuilder.Dispose();
            sqlAdapt.Dispose();
            oSQLConn.Close();
            if (pageHDN.Value != null && pageHDN.Value != "")
            {
                Response.Redirect(pageHDN.Value.ToString());
            }
            if (_ieMode == "New")
            {
                return("MidBack has been added...");
            }
            else if (_ieMode == "Update")
            {
                return("MidBack has been updated...");
            }
            else if (_ieMode == "Delete")
            {
                return("MidBack has been deleted...");
            }
            else
            {
                return("");
            }
        }
        catch (Exception ex)
        {
        }
        return("");
    }
示例#11
0
    public string SaveUI(string ieID, string ieMode, bool bpIsChecked)
    {
        long   _ieID     = Convert.ToInt64(ieID);
        string _ieMode   = "";
        string sProvider = ConfigurationManager.ConnectionStrings["connString_V3"].ConnectionString;
        string SqlStr    = "";

        oSQLConn.ConnectionString = sProvider;
        oSQLConn.Open();
        SqlStr = "Select * from tblbpOtherPart WHERE PatientIE_ID = " + ieID;
        SqlDataAdapter    sqlAdapt      = new SqlDataAdapter(SqlStr, oSQLConn);
        SqlCommandBuilder sqlCmdBuilder = new SqlCommandBuilder(sqlAdapt);
        DataTable         sqlTbl        = new DataTable();

        sqlAdapt.Fill(sqlTbl);
        DataRow TblRow;

        if (sqlTbl.Rows.Count == 0 && bpIsChecked == true)
        {
            _ieMode = "New";
        }
        else if (sqlTbl.Rows.Count == 0 && bpIsChecked == false)
        {
            _ieMode = "None";
        }
        else if (sqlTbl.Rows.Count > 0 && bpIsChecked == false)
        {
            _ieMode = "Delete";
        }
        else
        {
            _ieMode = "Update";
        }

        if (_ieMode == "New")
        {
            TblRow = sqlTbl.NewRow();
        }
        else if (_ieMode == "Update" || _ieMode == "Delete")
        {
            TblRow = sqlTbl.Rows[0];
            TblRow.AcceptChanges();
        }
        else
        {
            TblRow = null;
        }

        if (_ieMode == "Update" || _ieMode == "New")
        {
            TblRow["PatientIE_ID"]     = _ieID;
            TblRow["OthersCC"]         = txtOthersCC.Text.ToString();
            TblRow["OthersPE"]         = txtOthersPE.Text.ToString();
            TblRow["OthersA"]          = txtOthersA.Text.ToString();
            TblRow["OthersP"]          = txtOthersP.Text.ToString();
            TblRow["TreatMentDetails"] = Request.Form[txtTreatmentParagraph.UniqueID];
            TblRow["TreatMentDelimit"] = bindTeratMentPrintvalue();


            if (_ieMode == "New")
            {
                TblRow["CreatedBy"]   = "Admin";
                TblRow["CreatedDate"] = DateTime.Now;
                sqlTbl.Rows.Add(TblRow);
            }
            sqlAdapt.Update(sqlTbl);
        }
        else if (_ieMode == "Delete")
        {
            TblRow.Delete();
            sqlAdapt.Update(sqlTbl);
        }
        if (TblRow != null)
        {
            TblRow.Table.Dispose();
        }
        sqlTbl.Dispose();
        sqlCmdBuilder.Dispose();
        sqlAdapt.Dispose();
        oSQLConn.Close();
        if (pageHDN.Value != null && pageHDN.Value != "")
        {
            Response.Redirect(pageHDN.Value.ToString());
        }
        if (_ieMode == "New")
        {
            return("Hip has been added...");
        }
        else if (_ieMode == "Update")
        {
            return("Hip has been updated...");
        }
        else if (_ieMode == "Delete")
        {
            return("Hip has been deleted...");
        }
        else
        {
            return("");
        }
    }
示例#12
0
    public string SaveUI(string ieID, string ieMode, bool bpIsChecked)
    {
        long   _ieID     = Convert.ToInt64(ieID);
        string _ieMode   = "";
        string sProvider = ConfigurationManager.ConnectionStrings["connString_V3"].ConnectionString;
        string SqlStr    = "";

        oSQLConn.ConnectionString = sProvider;
        oSQLConn.Open();
        SqlStr = "Select * from tblbpHip WHERE PatientIE_ID = " + ieID;
        SqlDataAdapter    sqlAdapt      = new SqlDataAdapter(SqlStr, oSQLConn);
        SqlCommandBuilder sqlCmdBuilder = new SqlCommandBuilder(sqlAdapt);
        DataTable         sqlTbl        = new DataTable();

        sqlAdapt.Fill(sqlTbl);
        DataRow TblRow;

        if (sqlTbl.Rows.Count == 0 && bpIsChecked == true)
        {
            _ieMode = "New";
        }
        else if (sqlTbl.Rows.Count == 0 && bpIsChecked == false)
        {
            _ieMode = "None";
        }
        else if (sqlTbl.Rows.Count > 0 && bpIsChecked == false)
        {
            _ieMode = "Delete";
        }
        else
        {
            _ieMode = "Update";
        }

        if (_ieMode == "New")
        {
            TblRow = sqlTbl.NewRow();
        }
        else if (_ieMode == "Update" || _ieMode == "Delete")
        {
            TblRow = sqlTbl.Rows[0];
            TblRow.AcceptChanges();
        }
        else
        {
            TblRow = null;
        }

        if (_ieMode == "Update" || _ieMode == "New")
        {
            TblRow["PatientIE_ID"] = _ieID;


            //TblRow["ConstantLeft"] = chkContentLeft.Checked;
            //TblRow["IntermittentLeft"] = chkIntermittentLeft.Checked;
            //TblRow["ConstantRight"] = chkContentRight.Checked;
            //TblRow["IntermittentRight"] = chkIntermittentRight.Checked;

            //TblRow["WorseSittingLeft"] = chkWorseSittingLeft.Checked;
            //TblRow["WorseStandingLeft"] = chkWorseStandingLeft.Checked;
            //TblRow["WorseMovementLeft"] = chkWorseMovementLeft.Checked;
            //TblRow["WorseActivitiesLeft"] = chkWorseActivitiesLeft.Checked;
            //TblRow["WorseOtherLeft"] = txtWorseOtherLeft.Text.ToString();
            //TblRow["WorseSittingRight"] = chkWorseSittingRight.Checked;
            //TblRow["WorseStandingRight"] = chkWorseStandingRight.Checked;
            //TblRow["WorseMovementRight"] = chkWorseMovementRight.Checked;
            //TblRow["WorseActivitiesRight"] = chkWorseActivitiesRight.Checked;
            //TblRow["WorseOtherRight"] = txtWorseOtherRight.Text.ToString();

            //TblRow["GreaterTrochanterLeft"] = chkGreaterTrochanterLeft.Checked;
            //TblRow["PosteriorLeft"] = chkPosteriorLeft.Checked;
            //TblRow["IliotibialLeft"] = chkIliotibialLeft.Checked;
            //TblRow["GreaterTrochanterRight"] = chkGreaterTrochanterRight.Checked;
            //TblRow["PosteriorRight"] = chkPosteriorRight.Checked;
            //TblRow["IliotibialRight"] = chkIliotibialRight.Checked;

            TblRow["FlexRight"]        = txtFlexRight.Text.ToString();
            TblRow["IntRotationRight"] = txtIntRotationRight.Text.ToString();
            TblRow["ExtRotationRight"] = txtExtRotationRight.Text.ToString();

            TblRow["FlexLeft"]        = txtFlexLeft.Text.ToString();
            TblRow["IntRotationLeft"] = txtIntRotationLeft.Text.ToString();
            TblRow["ExtRotationLeft"] = txtExtRotationLeft.Text.ToString();

            TblRow["FlexNormal"]        = txtFlexNormal.Text.ToString();
            TblRow["IntRotationNormal"] = txtIntRotationNormal.Text.ToString();
            TblRow["ExtRotationNormal"] = txtExtRotationNormal.Text.ToString();


            TblRow["FreeFormA"] = txtFreeFormA.Text.ToString();
            TblRow["FreeFormP"] = txtFreeFormP.Text.ToString();

            TblRow["CCvalue"] = hdCCvalue.Value;



            string strname = "", strleft = "", strright = "", strnormal = "";

            for (int i = 0; i < repROM.Items.Count; i++)
            {
                Label   lblname   = repROM.Items[i].FindControl("lblname") as Label;
                TextBox txtleft   = repROM.Items[i].FindControl("txtleft") as TextBox;
                TextBox txtright  = repROM.Items[i].FindControl("txtright") as TextBox;
                TextBox txtnormal = repROM.Items[i].FindControl("txtnormal") as TextBox;

                strname   = strname + "," + lblname.Text;
                strleft   = strleft + "," + txtleft.Text;
                strright  = strright + "," + txtright.Text;
                strnormal = strnormal + "," + txtnormal.Text;
            }

            TblRow["LeftROM"]   = strleft.Substring(1);
            TblRow["RightROM"]  = strright.Substring(1);
            TblRow["NormalROM"] = strnormal.Substring(1);
            TblRow["NameROM"]   = strname.Substring(1);
            TblRow["PEvalue"]   = hdPEvalue.Value;


            if (_ieMode == "New")
            {
                TblRow["CreatedBy"]   = "Admin";
                TblRow["CreatedDate"] = DateTime.Now;
                sqlTbl.Rows.Add(TblRow);
            }
            sqlAdapt.Update(sqlTbl);
        }
        else if (_ieMode == "Delete")
        {
            TblRow.Delete();
            sqlAdapt.Update(sqlTbl);
        }
        if (TblRow != null)
        {
            TblRow.Table.Dispose();
        }
        sqlTbl.Dispose();
        sqlCmdBuilder.Dispose();
        sqlAdapt.Dispose();
        oSQLConn.Close();
        if (pageHDN.Value != null && pageHDN.Value != "")
        {
            Response.Redirect(pageHDN.Value.ToString());
        }
        if (_ieMode == "New")
        {
            return("Hip has been added...");
        }
        else if (_ieMode == "Update")
        {
            return("Hip has been updated...");
        }
        else if (_ieMode == "Delete")
        {
            return("Hip has been deleted...");
        }
        else
        {
            return("");
        }
    }