コード例 #1
0
    protected void lnkDelete_Click(object sender, EventArgs e)
    {
        DBHelperClass db = new DBHelperClass();

        try
        {
            LinkButton     lnkdelete = sender as LinkButton;
            string         SP        = "nusp_Delete_DiagCodes";
            SqlParameter[] param     = new SqlParameter[1];



            param[0] = new SqlParameter("@DiagCode_ID", lnkdelete.CommandArgument);


            int val = db.executeSP(SP, param);

            if (val > 0)
            {
                bindDiagCodeDetails(1);
                divSuccess.Attributes.Add("style", "display:block");
                divfail.Attributes.Add("style", "display:none");
            }
            else
            {
                divSuccess.Attributes.Add("style", "display:none");
                divfail.Attributes.Add("style", "display:block");
            }
        }
        catch (Exception ex)
        {
            log.Error(ex.Message);
        }
    }
コード例 #2
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        DBHelperClass db = new DBHelperClass();

        try
        {
            string         SP    = "";
            SqlParameter[] param = null;

            if (Request["id"] != null)
            {
                param = new SqlParameter[11];
                SP    = "nusp_Update_InsCos";
            }
            else
            {
                param = new SqlParameter[11];
                SP    = "nusp_Insert_InsCos";
            }

            param[0] = new SqlParameter("@InsCo", txtInco.Text);
            param[1] = new SqlParameter("@SetAsDefault", chkSetDefault.Checked);

            param[2] = new SqlParameter("@Address1", txtAddress1.Text);


            param[3] = new SqlParameter("@City", txtCity.Text);
            param[4] = new SqlParameter("@State", txtState.Text);
            param[5] = new SqlParameter("@Zip", txtZip.Text);
            param[6] = new SqlParameter("@EmailAddress", txtEmail.Text);

            param[7] = new SqlParameter("@Telephone", txtPhone.Text);
            param[8] = new SqlParameter("@ContactPerson", txtContacts.Text);
            param[9] = new SqlParameter("@Address2", txtAddress2.Text);


            if (Request["id"] != null)
            {
                param[10] = new SqlParameter("@InsCo_ID", Request["id"]);
            }
            else
            {
                param[10] = new SqlParameter("@CreatedBy", "Admin");
            }


            int val = db.executeSP(SP, param);

            if (val > 0)
            {
                Response.Redirect("ViewInsCo.aspx");
            }
        }
        catch (Exception ex)
        {
            log.Error(ex.Message);
        }
    }
コード例 #3
0
    private void savePatientData(DataRow dataRow)
    {
        DBHelperClass helperClass = new DBHelperClass();

        SqlParameter[] param = null;
        string         sp    = "";

        if (dataRow["ID"].ToString() == "")
        {
            param = new SqlParameter[27];
            sp    = "nusp_import_patientdata";
        }
        else
        {
            param = new SqlParameter[28];
            sp    = "nusp_import_update_patientdata";
        }

        param[0]  = new SqlParameter("@location", dataRow["Location"].ToString());
        param[1]  = new SqlParameter("@DOS", dataRow["DOS"].ToString());
        param[2]  = new SqlParameter("@DOA", dataRow["DOA"].ToString());
        param[3]  = new SqlParameter("@lastname", dataRow["Last Name"].ToString());
        param[4]  = new SqlParameter("@firstname", dataRow["First Name"].ToString());
        param[5]  = new SqlParameter("@middlename", dataRow["ML"].ToString());
        param[6]  = new SqlParameter("@sex", dataRow["Sex"].ToString());
        param[7]  = new SqlParameter("@DOB", dataRow["DOB"].ToString());
        param[8]  = new SqlParameter("@SSN", dataRow["SSN"].ToString());
        param[9]  = new SqlParameter("@home_ph", dataRow["Home Ph"].ToString());
        param[10] = new SqlParameter("@work_ph", dataRow["Work Ph"].ToString());
        param[11] = new SqlParameter("@mobile", dataRow["Mobile"].ToString());
        param[12] = new SqlParameter("@address", dataRow["Address"].ToString());
        param[13] = new SqlParameter("@city", dataRow["City"].ToString());
        param[14] = new SqlParameter("@state", dataRow["State"].ToString());
        param[15] = new SqlParameter("@zip", dataRow["Zip"].ToString());
        param[16] = new SqlParameter("@ins_co", dataRow["Insurance_Co"].ToString());
        param[17] = new SqlParameter("@claim", dataRow["Claim #"].ToString());
        param[18] = new SqlParameter("@policy_no", dataRow["Policy #"].ToString());
        param[19] = new SqlParameter("@attorney_name", dataRow["Attorney Name"].ToString());
        param[20] = new SqlParameter("@attorney_ph", dataRow["Attorney Ph"].ToString());
        param[21] = new SqlParameter("@case_type", dataRow["Case Type"].ToString());
        param[22] = new SqlParameter("@wcb_group", dataRow["WCB Group"].ToString());
        param[23] = new SqlParameter("@ma_provider", dataRow["MA & Providers"].ToString());
        param[24] = new SqlParameter("@adjuster", dataRow["Adjuster"].ToString());
        param[25] = new SqlParameter("@adjuster_ph", dataRow["Adjuster Ph"].ToString());
        param[26] = new SqlParameter("@ext", dataRow["Ext"].ToString());

        if (dataRow["ID"].ToString() != "")
        {
            param[27] = new SqlParameter("@PIE_ID", dataRow["ID"].ToString());
        }


        int val = helperClass.executeSP(sp, param);
    }
コード例 #4
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        DBHelperClass db = new DBHelperClass();

        try
        {
            string         SP    = "";
            SqlParameter[] param = null;

            if (Request["id"] != null)
            {
                param = new SqlParameter[5];
                SP    = "[nusp_Update_DiagCodes]";
            }
            else
            {
                param = new SqlParameter[5];
                SP    = "nusp_Insert_DiagCodes";
            }

            param[0] = new SqlParameter("@BodyPart", txtBodyPart.Text);
            param[1] = new SqlParameter("@DiagCode", txtDiagCode.Text);
            param[2] = new SqlParameter("@Description", txtDescription.Text);
            param[3] = new SqlParameter("@PreSelect", chkPreSelect.Checked);



            if (Request["id"] != null)
            {
                param[4] = new SqlParameter("@DiagCode_ID", Request["id"]);
            }
            else
            {
                param[4] = new SqlParameter("@CreatedBy", "Admin");
            }


            int val = db.executeSP(SP, param);

            if (val > 0)
            {
                Response.Redirect("ViewDiagCodes.aspx");
            }
        }
        catch (Exception ex)
        {
            log.Error(ex.Message);
        }
    }
コード例 #5
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        DBHelperClass db = new DBHelperClass();

        try
        {
            string         SP    = "";
            SqlParameter[] param = null;

            if (Request["id"] != null)
            {
                param = new SqlParameter[2];
                SP    = "[nusp_Update_Medicine]";
            }
            else
            {
                param = new SqlParameter[2];
                SP    = "nusp_Insert_Medicine";
            }

            param[0] = new SqlParameter("@Medicine", txtMedicine.Text);



            if (Request["id"] != null)
            {
                param[1] = new SqlParameter("@Medicine_ID", Request["id"]);
            }
            else
            {
                param[1] = new SqlParameter("@CreatedBy", "Admin");
            }


            int val = db.executeSP(SP, param);

            if (val > 0)
            {
                Response.Redirect("ViewMedicine.aspx");
            }
        }
        catch (Exception ex)
        {
            log.Error(ex.Message);
        }
    }
コード例 #6
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        DBHelperClass db = new DBHelperClass();

        try
        {
            string         SP    = "";
            SqlParameter[] param = null;

            if (Request["id"] != null)
            {
                param = new SqlParameter[15];
                SP    = "[nusp_update_location]";
            }
            else
            {
                param = new SqlParameter[15];
                SP    = "nusp_insert_location";
            }

            param[0] = new SqlParameter("@Location", txtLocation.Text);
            param[1] = new SqlParameter("@SetAsDefault", chkSetDefault.Checked);

            param[2] = new SqlParameter("@Address", txtAddress.Text);


            param[3] = new SqlParameter("@City", txtCity.Text);
            param[4] = new SqlParameter("@State", txtState.Text);
            param[5] = new SqlParameter("@Zip", txtZip.Text);
            param[6] = new SqlParameter("@EmailAddress", txtEmail.Text);

            param[7] = new SqlParameter("@Telephone", txtPhone.Text);
            param[8] = new SqlParameter("@ContactPerson", txtContacts.Text);

            param[9]  = new SqlParameter("@NameOfPractice", txtNameOfPractice.Text);
            param[10] = new SqlParameter("@Fax", txtFax.Text);
            param[11] = new SqlParameter("@Is_Active", chkActive.Checked);
            param[12] = new SqlParameter("@DrFName", txtDFName.Text);
            param[13] = new SqlParameter("@DrLName", txtDLName.Text);

            if (Request["id"] != null)
            {
                param[14] = new SqlParameter("@Location_ID", Request["id"]);
            }
            else
            {
                param[14] = new SqlParameter("@CreatedBy", "Admin");
            }


            int val = db.executeSP(SP, param);

            if (val > 0)
            {
                Response.Redirect("ViewLocations.aspx");
            }
        }
        catch (Exception ex)
        {
            log.Error(ex.Message);
        }
    }
コード例 #7
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        int           age = 0;
        DBHelperClass db  = new DBHelperClass();

        try
        {
            string         SP    = "";
            SqlParameter[] param = null;

            if (Request["id"] != null)
            {
                param = new SqlParameter[21];
                SP    = "nusp_Update_Patient";
            }
            else
            {
                param = new SqlParameter[22];
                SP    = "nusp_Insert_Patient";
            }

            param[0] = new SqlParameter("@Sex", ddlSex.SelectedValue);
            param[1] = new SqlParameter("@FirstName", txtFirstName.Text);
            param[2] = new SqlParameter("@LastName", txtLastName.Text);
            param[3] = new SqlParameter("@MiddleName", txtMiddleName.Text);


            if (string.IsNullOrWhiteSpace(txtDOB.Text))
            {
                param[4] = new SqlParameter("@DOB", DBNull.Value);
            }
            else
            {
                age      = System.DateTime.Now.Year - Convert.ToDateTime(txtDOB.Text).Year;
                param[4] = new SqlParameter("@DOB", Convert.ToDateTime(txtDOB.Text));
            }


            param[5] = new SqlParameter("@AGE", age);
            param[6] = new SqlParameter("@Handedness", ddlHandedness.SelectedItem.Text);
            param[7] = new SqlParameter("@Phone", txtPhone1.Text);
            param[8] = new SqlParameter("@Photo", fupImg.FileName);

            param[9]  = new SqlParameter("@AccountNumber", txtAccountNo.Text);
            param[10] = new SqlParameter("@Address1", txtAdd1.Text);
            param[11] = new SqlParameter("@Address2", txtAdd2.Text);
            param[12] = new SqlParameter("@City", txtCity.Text);
            param[13] = new SqlParameter("@State", txtState.Text);
            param[14] = new SqlParameter("@Zip", txtZip.Text);
            param[15] = new SqlParameter("@Phone2", txtPhone2.Text);
            param[16] = new SqlParameter("@eMail", txtEmail.Text);
            param[17] = new SqlParameter("@SSN", txtSSN.Text);
            param[18] = new SqlParameter("@policy_no", txtPolicyNo.Text);
            param[19] = new SqlParameter("@work_phone", txtWorkPhone.Text);

            if (Request["id"] == null)
            {
                param[20] = new SqlParameter("@UpdateFlag", "New");
                param[21] = new SqlParameter("@CreatedBy", "");
            }
            else
            {
                param[20] = new SqlParameter("@Patient_ID", Request["id"]);
            }

            int val = db.executeSP(SP, param);

            if (val > 0)
            {
                BindPatientIEDetails(Request["id"]);
                Response.Redirect("ViewPatientMaster.aspx");
            }
        }
        catch (Exception ex)
        {
            log.Error(ex.Message);
        }
    }
コード例 #8
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            string         SP    = "";
            SqlParameter[] param = null;

            param     = new SqlParameter[25];
            SP        = "usp_insert_PatientDetails";
            param[0]  = new SqlParameter("@FirstName", txt_fname.Text.ToLower());
            param[1]  = new SqlParameter("@LastName", txt_lname.Text.ToLower());
            param[2]  = new SqlParameter("@MiddleName", txt_mname.Text.ToLower());
            param[3]  = new SqlParameter("@Sex", ddl_gender.SelectedItem.Value);
            param[4]  = new SqlParameter("@Address", txt_add.Text.Trim().ToLower());
            param[5]  = new SqlParameter("@City", txt_city.Text.Trim());
            param[6]  = new SqlParameter("@State", ddState.SelectedItem.Value);
            param[7]  = new SqlParameter("@Zip", txt_zip.Text.Trim());
            param[8]  = new SqlParameter("@RaceEthnicity", txtRaceEthnicity.Text.Trim());
            param[9]  = new SqlParameter("@Language", txtLanguage.Text.Trim());
            param[10] = new SqlParameter("@HomePhno", txt_home_ph.Text.Trim());
            param[11] = new SqlParameter("@MobilePhno", txt_mobile.Text.Trim());
            param[12] = new SqlParameter("@eMail", txtEmail.Text.Trim());
            param[13] = new SqlParameter("@SSN", txt_SSN.Text.Trim());
            param[14] = new SqlParameter("@MaritalStatus", ddlMaratialStatus.SelectedItem.Value);
            param[15] = new SqlParameter("@PatientEmployment", txtPatientEmployment.Text.Trim());
            param[16] = new SqlParameter("@PEAddress", txt_zip.Text.Trim());
            param[17] = new SqlParameter("@PECity", txtPatientEmploymentCity.Text.Trim());
            param[18] = new SqlParameter("@PEState", ddlPatientEmploymentState.SelectedItem.Value);
            param[19] = new SqlParameter("@PEZip", txtPatientEmploymentZip.Text.Trim());
            param[20] = new SqlParameter("@RelationToPatient", txtRelation.Text.Trim());
            param[21] = new SqlParameter("@PEPhno", txtRelationPhno.Text.Trim());
            param[22] = new SqlParameter("@NextOfKinEmergency", txtNextOfKinEmergency.Text.Trim());
            param[23] = new SqlParameter("@Description", txtDescription.Text.Trim());

            if (string.IsNullOrWhiteSpace(txt_DOB.Text))
            {
                param[24] = new SqlParameter("@DOB", DBNull.Value);
            }
            else
            {
                param[24] = new SqlParameter("@DOB", Convert.ToDateTime(txt_DOB.Text));
            }

            int val = db.executeSP(SP, param);

            if (val > 0)
            {
                lblmess.Text      = "Patient Details Recorded Sucessfully.";
                lblmess.ForeColor = System.Drawing.Color.Green;

                lblMessage.Attributes.Add("style", "color:green");
                upMessage.Update();
                DataSet locds = new DataSet();
            }
        }
        catch (Exception ex)
        {
            db.LogError(ex);
        }
        finally
        {
            ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), Guid.NewGuid().ToString(), "openPopup('mymodelmessage')", true);
            ClearControls();
        }
    }