Пример #1
0
        public bool ChangePassword(double officerID, string newPassword)
        {
            bool ret = true;
            OfficerDAL offDAL = new OfficerDAL();
            OracleDBObj obj = new OracleDBObj();
            obj.CreateConnection();
            obj.CreateTransaction();
            try
            {
                offDAL.GetDataByLOID(officerID, obj.zTrans);
                offDAL.PASSWORD = Encrypt(newPassword);

                if (offDAL.OnDB)
                    offDAL.UpdateCurrentData(offDAL.USERID, obj.zTrans);
                else
                    throw new ApplicationException("��辺�����Ţͧ��ҹ��к�");

                obj.zTrans.Commit();
                obj.zConn.Close();
            }
            catch (Exception ex)
            {
                ret = false;
                _error = ex.Message;
                obj.zTrans.Rollback();
                obj.zConn.Close();
            }
            return ret;
        }
Пример #2
0
 public OfficerData GetOfficerData(double loid)
 {
     OfficerDAL dal = new OfficerDAL();
     OfficerData data = new OfficerData();
     dal.GetDataByLOID(loid, null);
     data.TNAME = dal.TNAME;
     data.LASTNAME = dal.LASTNAME;
     data.DIVISION = dal.DIVISION;
     data.USERID = dal.USERID;
     data.PASSWORD = dal.PASSWORD;
     data.EFDATE = dal.EFDATE;
     data.EPDATE = dal.EPDATE;
     return data;
 }