Ejemplo n.º 1
0
        protected void SetUpStudents()
        {
            if (Request.IsMobileDevice())
            {
                mfbIlOfflineEndorsements.Columns = 1;
            }
            mfuOfflineEndorsements.Class = MyFlightbook.Image.MFBImageInfo.ImageClass.OfflineEndorsement;
            mfbIlOfflineEndorsements.Key = Page.User.Identity.Name;
            mfbIlOfflineEndorsements.Refresh();
            byte[] rgbDefaultScribble = CFIStudentMap.DefaultScribbleForInstructor(m_pf);
            mvDefaultSig.SetActiveView(vwCurrentSig);
            if (rgbDefaultScribble == null || rgbDefaultScribble.Length == 0)
            {
                lnkEditDefaultSig.Text = Resources.LocalizedText.StudentSigningDefaultScribbleAdd;
                imgCurrSig.Src         = string.Empty;
            }
            else
            {
                imgCurrSig.Src = ScribbleImage.DataLinkForByteArray(rgbDefaultScribble);
            }

            Profile pf = Profile.GetUser(Page.User.Identity.Name);

            pnlCertificate.Visible          = String.IsNullOrEmpty(pf.Certificate);
            txtCertificate.Text             = pf.Certificate;
            mfbTypeInDateCFIExpiration.Date = pf.CertificateExpiration;

            mfbScribbleSignature.WatermarkRef = ResolveClientUrl("~/images/rubberstamp.png");
        }
Ejemplo n.º 2
0
 protected void btnSaveDefaultSig_Click(object sender, EventArgs e)
 {
     byte[] rgbSig = mfbScribbleSignature.Base64Data();
     CFIStudentMap.SetDefaultScribbleForInstructor(m_pf, rgbSig);
     imgCurrSig.Src         = ScribbleImage.DataLinkForByteArray(rgbSig);
     imgCurrSig.Visible     = (rgbSig.Length != 0);
     lnkEditDefaultSig.Text = (rgbSig.Length == 0) ? Resources.LocalizedText.StudentSigningDefaultScribbleAdd : Resources.LocalizedText.StudentSigningDefaultScribbleEdit;
     mvDefaultSig.SetActiveView(vwCurrentSig);
 }