Exemple #1
0
        private bool upDate()
        {
            IStaffService staffService = new StaffService(Settings.Default.db);
            StaffIdCard   cardData     = new StaffIdCard();

            cardData.id               = ID.Text;
            cardData.name             = Name.Text;
            cardData.sex              = escape.SexEscapeForUpdate(Sex.Text);
            cardData.ethnic           = Nation.Text;
            cardData.birthday         = Convert.ToDateTime(Born.Text);
            cardData.residenceAddress = Address.Text;
            cardData.effectiveFrom    = Convert.ToDateTime(UserLifeBegin.Text);
            cardData.effectiveEnd     = Convert.ToDateTime(UserLifeEnd.Text);
            cardData.institution      = GrantDept.Text;
            cardData.photo            = "data:image/jpg;base64," + photoToString();
            return(staffService.CheckStaffAndUpdateInfo(cardData));
        }