Exemplo n.º 1
0
 private void SaveSignature()
 {
     if (SigChanged)
     {
         //This check short-circuits so that sigBoxTopaz.Visible will not be checked in MONO ever.
         if (Environment.OSVersion.Platform != PlatformID.Unix && sigBoxTopaz.Visible)
         {
             DocCur.SigIsTopaz = true;
             if (sigBoxTopaz.NumberOfTabletPoints() == 0)
             {
                 DocCur.Signature = "";
                 return;
             }
             sigBoxTopaz.SetSigCompressionMode(0);
             sigBoxTopaz.SetEncryptionMode(0);
             sigBoxTopaz.SetKeyString(ImageStore.GetHashString(DocCur, PatFolder));
             //"0000000000000000");
             //sigBoxTopaz.SetAutoKeyData(ProcCur.Note+ProcCur.UserNum.ToString());
             sigBoxTopaz.SetEncryptionMode(2);
             sigBoxTopaz.SetSigCompressionMode(2);
             DocCur.Signature = sigBoxTopaz.GetSigString();
         }
         else
         {
             DocCur.SigIsTopaz = false;
             if (sigBox.NumberOfTabletPoints() == 0)
             {
                 DocCur.Signature = "";
                 return;
             }
             //sigBox.SetSigCompressionMode(0);
             //sigBox.SetEncryptionMode(0);
             sigBox.SetKeyString(ImageStore.GetHashString(DocCur, PatFolder));
             //"0000000000000000");
             //sigBox.SetAutoKeyData(ProcCur.Note+ProcCur.UserNum.ToString());
             //sigBox.SetEncryptionMode(2);
             //sigBox.SetSigCompressionMode(2);
             DocCur.Signature = sigBox.GetSigString();
         }
     }
 }
Exemplo n.º 2
0
 private void SaveSignature()
 {
     if (SigChanged)
     {
         if (sigBoxTopaz.Visible)
         {
             DocCur.SigIsTopaz = true;
             if (sigBoxTopaz.NumberOfTabletPoints() == 0)
             {
                 DocCur.Signature = "";
                 return;
             }
             sigBoxTopaz.SetSigCompressionMode(0);
             sigBoxTopaz.SetEncryptionMode(0);
             sigBoxTopaz.SetKeyString(GetHashString());
             //"0000000000000000");
             //sigBoxTopaz.SetAutoKeyData(ProcCur.Note+ProcCur.UserNum.ToString());
             sigBoxTopaz.SetEncryptionMode(2);
             sigBoxTopaz.SetSigCompressionMode(2);
             DocCur.Signature = sigBoxTopaz.GetSigString();
         }
         else
         {
             DocCur.SigIsTopaz = false;
             if (sigBox.NumberOfTabletPoints() == 0)
             {
                 DocCur.Signature = "";
                 return;
             }
             //sigBox.SetSigCompressionMode(0);
             //sigBox.SetEncryptionMode(0);
             sigBox.SetKeyString(GetHashString());
             //"0000000000000000");
             //sigBox.SetAutoKeyData(ProcCur.Note+ProcCur.UserNum.ToString());
             //sigBox.SetEncryptionMode(2);
             //sigBox.SetSigCompressionMode(2);
             DocCur.Signature = sigBox.GetSigString();
         }
     }
 }
Exemplo n.º 3
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            SigPlusNET1.ClearSigWindow(1);

            strDateTime = DateTime.Now.ToString("dd/MM/yyyy  hh:mm tt");
            SigPlusNET1.SetTimeStamp(strDateTime);
            SigPlusNET1.SetSaveSigInfo(true);

            SigPlusNET1.SetSigCompressionMode(1);
            SigPlusNET1.AutoKeyStart();
            SigPlusNET1.SetAutoKeyData(strKeyData);
            SigPlusNET1.AutoKeyFinish();
            SigPlusNET1.SetEncryptionMode(2);

            txtImageBinary.Text = SigPlusNET1.GetSigString();
            strSignatureID      = txtImageBinary.Text;
            SigPlusNET1.SetTabletState(0);

            string  strSQL = "Update tblMember Set strDNCConsentSignatureID='" + strSignatureID + "',strDNCConsentSigKey='" + strKeyData + "' where strMembershipID='" + strMembershipID + "'";
            DataSet _ds;

            _ds = new DataSet();
            SqlHelper.FillDataset(connection, CommandType.StoredProcedure, "UP_GETDATA", _ds, new string[] { "table" }, new SqlParameter("@strSQL", strSQL));

            SqlHelper.ExecuteNonQuery(connection, "sp_DNCMemberSubscriptionUpdateWithLogs",
                                      new SqlParameter("@strMembershipID", strMembershipID),
                                      new SqlParameter("@fPhoneCall", true),
                                      new SqlParameter("@fSMS", true),
                                      new SqlParameter("@fEmail", true),
                                      new SqlParameter("@fPostalMail", true),
                                      new SqlParameter("@fDNC", fDNC),
                                      new SqlParameter("@nTypeID", 5)
                                      );

            MessageBox.Show("DNC Consent successfully saved", "Save");

            this.DialogResult = DialogResult.OK;
        }