コード例 #1
0
        public StatusFamilyName StautsFamilyName(string firm, string pcc, string connectionName)
        {
            Database  db        = DatabaseFactory.CreateDatabase(connectionName);
            DbCommand dbCommand = db.GetStoredProcCommand(Resources.StatusFamilyResources.SP_GETSTATUSFAMILYNAME2);

            db.AddInParameter(dbCommand, Resources.StatusFamilyResources.PARAM_QUERY, DbType.String, firm);
            db.AddInParameter(dbCommand, Resources.StatusFamilyResources.PARAM_QUERY2, DbType.String, pcc);

            StatusFamilyName user = new StatusFamilyName();

            using (IDataReader dr = db.ExecuteReader(dbCommand))
            {
                int _statusfirm = dr.GetOrdinal(Resources.StatusFamilyResources.PARAM_STATUSFIRM);
                int _familyname = dr.GetOrdinal(Resources.StatusFamilyResources.PARAM_FAMILYNAME);
                int _pcc        = dr.GetOrdinal(Resources.StatusFamilyResources.PARAM_PCC);
                try
                {
                    if (dr.Read())
                    {
                        user.StatusFirm = (dr[_statusfirm] == DBNull.Value) ? Types.StringNullValue : dr.GetString(_statusfirm);
                        user.FamilyName = (dr[_familyname] == DBNull.Value) ? Types.StringNullValue : dr.GetString(_familyname);
                        user.PCC        = (dr[_pcc] == DBNull.Value) ? Types.StringNullValue : dr.GetString(_pcc);
                    }
                }
                catch { }
            }
            return(user);
        }
コード例 #2
0
        public static StatusFamilyName StautsFamilyName(string firm, string pcc)
        {
            StatusFamilyName    statusFamilyName       = new StatusFamilyName();
            StatusFamilyNameDAL objGetStatusFamilyName = new StatusFamilyNameDAL();

            try
            {
                try
                {
                    statusFamilyName = objGetStatusFamilyName.StautsFamilyName(firm, pcc, CommonENT.MYCTSDBSECURITY_CONNECTION);
                }
                catch (Exception ex)
                {
                    new EventsManager.EventsManager(ex, EventsManager.EventsManager.OrigenError.BaseDeDatos);
                    statusFamilyName = objGetStatusFamilyName.StautsFamilyName(firm, pcc, CommonENT.MYCTSDBSECURITYBACKUP_CONNECTION);
                }
            }
            catch
            { }
            return(statusFamilyName);
        }
コード例 #3
0
 //Exrae Status y FamilyName del usuario
 private void FirmInformation(string firm, string PCC)
 {
     usuario = null;
     usuario = StatusFamilyNameBL.StautsFamilyName(firm, PCC);
 }