protected void btnSubmit_Click(object sender, EventArgs e)
        {
            objSecureMedicalRecordBLL              = new BLL.SecureMedicalRecordBLL();
            objSecureMedicalRecordDTO              = new DTO.SecureMedicalRecordDTO();
            objSecureMedicalRecordDTO.PatientId    = int.Parse(txtPatientId.Text);
            objSecureMedicalRecordDTO.DoctorId     = int.Parse(Session["UserId"].ToString());
            objSecureMedicalRecordDTO.ProblemTitle = txtProblem.Text;
            Shamir obj           = new Shamir();
            Random rnd           = new Random();
            int    key           = rnd.Next(1000, 9999);
            string attributedata = obj.AttributeValue(key);

            attributedata = attributedata.Remove(0, 1);
            objSecureMedicalRecordDTO.PastData = AESCryptoClass.EncryptData(txtDesp.Text, key.ToString());

            objSecureMedicalRecordDTO.DataKey = attributedata;
            string res = objSecureMedicalRecordBLL.PatientTreatment(objSecureMedicalRecordDTO);

            if (res == "1")
            {
                txtPatientId.Text = txtDesp.Text = txtProblem.Text = "";
                lblMsg.ForeColor  = System.Drawing.Color.Green;
                lblMsg.Text       = "Patient Treatment Uploaded Successfully";
            }
            else
            {
                lblMsg.ForeColor = System.Drawing.Color.Red;
                lblMsg.Text      = "Patient Treatment Upload Error";
            }
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            objSecureMedicalRecordBLL            = new BLL.SecureMedicalRecordBLL();
            objSecureMedicalRecordDTO            = new DTO.SecureMedicalRecordDTO();
            objSecureMedicalRecordDTO.RecordName = txtRecordName.Text;
            objSecureMedicalRecordDTO.DoctorId   = int.Parse(Session["UserId"].ToString());
            objSecureMedicalRecordDTO.RecordData = txtDescp.Text;

            Shamir obj           = new Shamir();
            Random rnd           = new Random();
            int    key           = rnd.Next(1000, 9999);
            string attributedata = obj.AttributeValue(key);

            attributedata = attributedata.Remove(0, 1);
            string Encryptdata = AESCryptoClass.EncryptData(objSecureMedicalRecordDTO.RecordData, key.ToString());

            objSecureMedicalRecordDTO.PastData = Encryptdata;
            objSecureMedicalRecordDTO.DataKey  = attributedata;
            int res = objSecureMedicalRecordBLL.UploadDoctorMedicalRecord(objSecureMedicalRecordDTO);

            if (res == 1)
            {
                txtRecordName.Text = txtDescp.Text = "";
                lblMsg.Text        = "Medical Upload Created Successfully";
                lblMsg.ForeColor   = System.Drawing.Color.Green;
            }
            else if (res == 2)
            {
                txtRecordName.Text = txtDescp.Text = "";
                lblMsg.Text        = "Medical Record Name Created Already";
                lblMsg.ForeColor   = System.Drawing.Color.Red;
            }
            else
            {
                txtRecordName.Text = txtDescp.Text = "";
                lblMsg.Text        = "Medical Upload Creation Error";
                lblMsg.ForeColor   = System.Drawing.Color.Red;
            }
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            objSecureMedicalRecordBLL = new BLL.SecureMedicalRecordBLL();
            objSecureMedicalRecordDTO = new DTO.SecureMedicalRecordDTO();
            Shamir obj           = new Shamir();
            Random rnd           = new Random();
            int    key           = rnd.Next(1000, 9999);
            string attributedata = obj.AttributeValue(key);

            attributedata = attributedata.Remove(0, 1);
            objSecureMedicalRecordDTO.PatientId = PatientId;
            string PastData = txtMedicalHistory.Text + "-" + txtPatientAllergies.Text + "-" + txtSocialHistory.Text;

            objSecureMedicalRecordDTO.PastData = AESCryptoClass.EncryptData(PastData, key.ToString());
            objSecureMedicalRecordDTO.DataKey  = attributedata;
            string res = objSecureMedicalRecordBLL.CreatePatientClinical(objSecureMedicalRecordDTO);

            if (res == "1")
            {
                txtMedicalHistory.Text = txtPatientAllergies.Text = txtSocialHistory.Text = "";
                lblMsg.Text            = "Patient Past Medical History Uploaded Successfully & Patient Id:" + PatientId + " & Password:"******"Password"].ToString();
                lblMsg.ForeColor       = System.Drawing.Color.Green;
            }
            else if (res == "2")
            {
                txtMedicalHistory.Text = txtPatientAllergies.Text = txtSocialHistory.Text = "";
                lblMsg.Text            = "Patient Past Medical History Uploaded Already";
                lblMsg.ForeColor       = System.Drawing.Color.Red;
            }
            else
            {
                txtMedicalHistory.Text = txtPatientAllergies.Text = txtSocialHistory.Text = "";
                lblMsg.Text            = "Patient Past Medical History Upload Error";
                lblMsg.ForeColor       = System.Drawing.Color.Red;
            }
        }