public void Setup()
        {
            //Instance Fields Setup
            BooleanField = null;
            ByteField = null;
            SByteField = null;
            IntField = null;
            LongField = null;
            Int16Field = null;
            UInt16Field = null;
            Int32Field = null;
            UInt32Field = null;
            Int64Field = null;
            UInt64Field = null;
            CharField = null;
            DoubleField = null;
            FloatField = null;

            //Static Fields Setup
            BooleanFieldStatic = null;
            ByteFieldStatic = null;
            SByteFieldStatic = null;
            IntFieldStatic = null;
            LongFieldStatic = null;
            Int16FieldStatic = null;
            UInt16FieldStatic = null;
            Int32FieldStatic = null;
            UInt32FieldStatic = null;
            Int64FieldStatic = null;
            UInt64FieldStatic = null;
            CharFieldStatic = null;
            DoubleFieldStatic = null;
            FloatFieldStatic = null;
        }
Beispiel #2
0
		public ElementInfo(EBMLDocElement docElement, Int64 idPos, Int64 vintPos, Int64 dataPos, Int64? dataLength) {
			DocElement = docElement;
			IdPos = idPos;
			VIntPos = vintPos;
			DataPos = dataPos;
			DataLength = dataLength;
		}
        internal DatabasePrincipalImpersonationEvent(IDataRecord record, DatabasePrincipalImpersonationEventLoaderInfo loaderInfo)
        {
            Contract.Requires(null != record, "The record must be valid.");
            Contract.Requires(null != loaderInfo, "The loaderInfo must be valid.");

            if (null != loaderInfo.TextDataOrdinal)
                _textData = record.GetNullableString(loaderInfo.TextDataOrdinal.Value);
            if (null != loaderInfo.DatabaseIDOrdinal)
                _databaseID = record.GetNullableInt32(loaderInfo.DatabaseIDOrdinal.Value);
            if (null != loaderInfo.TransactionIDOrdinal)
                _transactionID = record.GetNullableInt64(loaderInfo.TransactionIDOrdinal.Value);
            if (null != loaderInfo.NTUserNameOrdinal)
                _nTUserName = record.GetNullableString(loaderInfo.NTUserNameOrdinal.Value);
            if (null != loaderInfo.NTDomainNameOrdinal)
                _nTDomainName = record.GetNullableString(loaderInfo.NTDomainNameOrdinal.Value);
            if (null != loaderInfo.HostNameOrdinal)
                _hostName = record.GetNullableString(loaderInfo.HostNameOrdinal.Value);
            if (null != loaderInfo.ApplicationNameOrdinal)
                _applicationName = record.GetNullableString(loaderInfo.ApplicationNameOrdinal.Value);
            if (null != loaderInfo.LoginNameOrdinal)
                _loginName = record.GetNullableString(loaderInfo.LoginNameOrdinal.Value);
            if (null != loaderInfo.SPIDOrdinal)
                _sPID = record.GetNullableInt32(loaderInfo.SPIDOrdinal.Value);
            if (null != loaderInfo.StartTimeOrdinal)
                _startTime = record.GetNullableDateTime(loaderInfo.StartTimeOrdinal.Value);
            if (null != loaderInfo.PermissionsOrdinal)
                _permissions = record.GetNullableInt64(loaderInfo.PermissionsOrdinal.Value);
            if (null != loaderInfo.EventSubClassOrdinal)
                _eventSubClass = record.GetNullableInt32(loaderInfo.EventSubClassOrdinal.Value);
            if (null != loaderInfo.SuccessOrdinal)
                _success = record.GetNullableInt32(loaderInfo.SuccessOrdinal.Value);
            if (null != loaderInfo.ServerNameOrdinal)
                _serverName = record.GetNullableString(loaderInfo.ServerNameOrdinal.Value);
            if (null != loaderInfo.ObjectTypeOrdinal)
                _objectType = record.GetNullableInt32(loaderInfo.ObjectTypeOrdinal.Value);
            if (null != loaderInfo.NestLevelOrdinal)
                _nestLevel = record.GetNullableInt32(loaderInfo.NestLevelOrdinal.Value);
            if (null != loaderInfo.ObjectNameOrdinal)
                _objectName = record.GetNullableString(loaderInfo.ObjectNameOrdinal.Value);
            if (null != loaderInfo.DatabaseNameOrdinal)
                _databaseName = record.GetNullableString(loaderInfo.DatabaseNameOrdinal.Value);
            if (null != loaderInfo.OwnerNameOrdinal)
                _ownerName = record.GetNullableString(loaderInfo.OwnerNameOrdinal.Value);
            if (null != loaderInfo.RoleNameOrdinal)
                _roleName = record.GetNullableString(loaderInfo.RoleNameOrdinal.Value);
            if (null != loaderInfo.DBUserNameOrdinal)
                _dBUserName = record.GetNullableString(loaderInfo.DBUserNameOrdinal.Value);
            if (null != loaderInfo.LoginSidOrdinal)
                _loginSid = (Byte[])record.GetValue(loaderInfo.LoginSidOrdinal.Value);
            if (null != loaderInfo.RequestIDOrdinal)
                _requestID = record.GetNullableInt32(loaderInfo.RequestIDOrdinal.Value);
            if (null != loaderInfo.XactSequenceOrdinal)
                _xactSequence = record.GetNullableInt64(loaderInfo.XactSequenceOrdinal.Value);
            if (null != loaderInfo.EventSequenceOrdinal)
                _eventSequence = record.GetNullableInt64(loaderInfo.EventSequenceOrdinal.Value);
            if (null != loaderInfo.IsSystemOrdinal)
                _isSystem = record.GetNullableInt32(loaderInfo.IsSystemOrdinal.Value);
            if (null != loaderInfo.SessionLoginNameOrdinal)
                _sessionLoginName = record.GetNullableString(loaderInfo.SessionLoginNameOrdinal.Value);
        }
Beispiel #4
0
 public ChangeTable(string name, Int64? CTID, String schema, string slaveName)
 {
     this.name = name;
     this.CTID = CTID;
     this.schemaName = schema;
     this.slaveName = slaveName;
 }
		public SpaceObjectDistanceEnsureMaxParam(
			OverviewEntry OverviewEntry,
			Int64? DistanceMax)
		{
			this.OverviewEntry = OverviewEntry;
			this.DistanceMax = DistanceMax;
		}
Beispiel #6
0
        //Initializes, attaches it to archive
        internal ZipArchiveEntry(ZipArchive archive, ZipCentralDirectoryFileHeader cd)
        {
            _archive = archive;

            _originallyInArchive = true;

            _diskNumberStart = cd.DiskNumberStart;
            _versionToExtract = (ZipVersionNeededValues)cd.VersionNeededToExtract;
            _generalPurposeBitFlag = (BitFlagValues)cd.GeneralPurposeBitFlag;
            CompressionMethod = (CompressionMethodValues)cd.CompressionMethod;
            _lastModified = new DateTimeOffset(ZipHelper.DosTimeToDateTime(cd.LastModified));
            _compressedSize = cd.CompressedSize;
            _uncompressedSize = cd.UncompressedSize;
            _offsetOfLocalHeader = cd.RelativeOffsetOfLocalHeader;
            /* we don't know this yet: should be _offsetOfLocalHeader + 30 + _storedEntryNameBytes.Length + extrafieldlength
                * but entryname/extra length could be different in LH
                */
            _storedOffsetOfCompressedData = null;
            _crc32 = cd.Crc32;

            _compressedBytes = null;
            _storedUncompressedData = null;
            _currentlyOpenForWrite = false;
            _everOpenedForWrite = false;
            _outstandingWriteStream = null;

            FullName = DecodeEntryName(cd.Filename);

            _lhUnknownExtraFields = null;
            //the cd should have these as null if we aren't in Update mode
            _cdUnknownExtraFields = cd.ExtraFields;
            _fileComment = cd.FileComment;

            _compressionLevel = null;
        }
        internal BrokerConversationEvent(IDataRecord record, BrokerConversationEventLoaderInfo loaderInfo)
        {
            Contract.Requires(null != record, "The record must be valid.");
            Contract.Requires(null != loaderInfo, "The loaderInfo must be valid.");

            if (null != loaderInfo.TextDataOrdinal)
                _textData = record.GetNullableString(loaderInfo.TextDataOrdinal.Value);
            if (null != loaderInfo.DatabaseIDOrdinal)
                _databaseID = record.GetNullableInt32(loaderInfo.DatabaseIDOrdinal.Value);
            if (null != loaderInfo.TransactionIDOrdinal)
                _transactionID = record.GetNullableInt64(loaderInfo.TransactionIDOrdinal.Value);
            if (null != loaderInfo.NTUserNameOrdinal)
                _nTUserName = record.GetNullableString(loaderInfo.NTUserNameOrdinal.Value);
            if (null != loaderInfo.NTDomainNameOrdinal)
                _nTDomainName = record.GetNullableString(loaderInfo.NTDomainNameOrdinal.Value);
            if (null != loaderInfo.HostNameOrdinal)
                _hostName = record.GetNullableString(loaderInfo.HostNameOrdinal.Value);
            if (null != loaderInfo.ClientProcessIDOrdinal)
                _clientProcessID = record.GetNullableInt32(loaderInfo.ClientProcessIDOrdinal.Value);
            if (null != loaderInfo.ApplicationNameOrdinal)
                _applicationName = record.GetNullableString(loaderInfo.ApplicationNameOrdinal.Value);
            if (null != loaderInfo.LoginNameOrdinal)
                _loginName = record.GetNullableString(loaderInfo.LoginNameOrdinal.Value);
            if (null != loaderInfo.SPIDOrdinal)
                _sPID = record.GetNullableInt32(loaderInfo.SPIDOrdinal.Value);
            if (null != loaderInfo.StartTimeOrdinal)
                _startTime = record.GetNullableDateTime(loaderInfo.StartTimeOrdinal.Value);
            if (null != loaderInfo.SeverityOrdinal)
                _severity = record.GetNullableInt32(loaderInfo.SeverityOrdinal.Value);
            if (null != loaderInfo.EventSubClassOrdinal)
                _eventSubClass = record.GetNullableInt32(loaderInfo.EventSubClassOrdinal.Value);
            if (null != loaderInfo.ObjectIDOrdinal)
                _objectID = record.GetNullableInt32(loaderInfo.ObjectIDOrdinal.Value);
            if (null != loaderInfo.IntegerDataOrdinal)
                _integerData = record.GetNullableInt32(loaderInfo.IntegerDataOrdinal.Value);
            if (null != loaderInfo.ServerNameOrdinal)
                _serverName = record.GetNullableString(loaderInfo.ServerNameOrdinal.Value);
            if (null != loaderInfo.StateOrdinal)
                _state = record.GetNullableInt32(loaderInfo.StateOrdinal.Value);
            if (null != loaderInfo.ErrorOrdinal)
                _error = record.GetNullableInt32(loaderInfo.ErrorOrdinal.Value);
            if (null != loaderInfo.RoleNameOrdinal)
                _roleName = record.GetNullableString(loaderInfo.RoleNameOrdinal.Value);
            if (null != loaderInfo.DBUserNameOrdinal)
                _dBUserName = record.GetNullableString(loaderInfo.DBUserNameOrdinal.Value);
            if (null != loaderInfo.LoginSidOrdinal)
                _loginSid = (Byte[])record.GetValue(loaderInfo.LoginSidOrdinal.Value);
            if (null != loaderInfo.TargetLoginNameOrdinal)
                _targetLoginName = record.GetNullableString(loaderInfo.TargetLoginNameOrdinal.Value);
            if (null != loaderInfo.EventSequenceOrdinal)
                _eventSequence = record.GetNullableInt64(loaderInfo.EventSequenceOrdinal.Value);
            if (null != loaderInfo.BigintData1Ordinal)
                _bigintData1 = record.GetNullableInt64(loaderInfo.BigintData1Ordinal.Value);
            if (null != loaderInfo.GUIDOrdinal)
                _gUID = record.GetNullableGuid(loaderInfo.GUIDOrdinal.Value);
            if (null != loaderInfo.IsSystemOrdinal)
                _isSystem = record.GetNullableInt32(loaderInfo.IsSystemOrdinal.Value);
            if (null != loaderInfo.SessionLoginNameOrdinal)
                _sessionLoginName = record.GetNullableString(loaderInfo.SessionLoginNameOrdinal.Value);
        }
 public DatabaseSchemaVersionManager(DbmsFactory factory, string deltaSet, Int64? currentVersion, string tableName)
 {
     this.factory = factory;
     this.deltaSet = deltaSet;
     this.currentVersion = currentVersion;
 	this.tableName = tableName;
 }
		public ConnectionGroupInfo()
		{
			this._connections       = new List<InstanceInfo>();
			this._templateId        = null;
			this._groupId           = null;
			this._syncLock          = new object();
			this.IsDirectConnection = false;
		}
 public DatabaseSchemaVersionManager(DbmsFactory factory, string deltaSet, Int64? currentVersion, string tableName, string changeOwner)
 {
     _factory = factory;
     _deltaSet = deltaSet;
     _currentVersion = currentVersion;
     _tableName = tableName;
     _changeOwner = changeOwner;
 }
 public Process(string name, Int64? pid, string path, string[] arg, string[] env)
     : this(name)
 {
     this.pid = pid;
     this.path = path;
     this.arg = arg;
     this.env = env;
 }
Beispiel #12
0
 public Assessment(SQLiteDataReader results)
 {
     this._id = results[idColumn] as Int64?;
     this._title = results[titleColumn] as String;
     this._weight = results[weightColumn] as Int64?;
     this._type = results[typeColumn] as String;
     this._result = results[resultColumn] as Int64?;
 }
Beispiel #13
0
 public Module(SQLiteDataReader results)
 {
     this._id = results[idColumn] as Int64?;
     this._name = results[nameColumn] as String;
     this._code = results[codeColumn] as String;
     this._credits = results[creditsColumn] as Int64?;
     this._year = results[yearColumn] as Int64?;
 }
Beispiel #14
0
 private Module(Int64 id, String name, String code, Int64 year, Int64 credits)
 {
     this._id = id;
     this._name = name;
     this._code = code;
     this._year = year;
     this._credits = credits;
 }
 public Address(string address, string netmask, string ident, AddressCategoryEnum category, string vlanName, Int64? vlanNum)
     : this(address, netmask)
 {
     this.ident = string.IsNullOrEmpty(ident) ? "0" : ident;
     this.category = category;
     this.vlanName = vlanName;
     this.vlanNum = vlanNum;
 }
 public XmlFileTableSource()
 {
     this._fileName        = null;
     this._pathToItems     = null;
     this._itemTag         = null;
     this._columns         = new List<XmlFileTableSourceItem>();
     this._recordSetNumber = null;
 }
Beispiel #17
0
        internal AddLoginEvent(IDataRecord record, AddLoginEventLoaderInfo loaderInfo)
        {
            Contract.Requires(null != record, "The record must be valid.");
            Contract.Requires(null != loaderInfo, "The loaderInfo must be valid.");

            if (null != loaderInfo.TextDataOrdinal)
                _textData = record.GetNullableString(loaderInfo.TextDataOrdinal.Value);
            if (null != loaderInfo.DatabaseIDOrdinal)
                _databaseID = record.GetNullableInt32(loaderInfo.DatabaseIDOrdinal.Value);
            if (null != loaderInfo.TransactionIDOrdinal)
                _transactionID = record.GetNullableInt64(loaderInfo.TransactionIDOrdinal.Value);
            if (null != loaderInfo.LineNumberOrdinal)
                _lineNumber = record.GetNullableInt32(loaderInfo.LineNumberOrdinal.Value);
            if (null != loaderInfo.NTUserNameOrdinal)
                _nTUserName = record.GetNullableString(loaderInfo.NTUserNameOrdinal.Value);
            if (null != loaderInfo.NTDomainNameOrdinal)
                _nTDomainName = record.GetNullableString(loaderInfo.NTDomainNameOrdinal.Value);
            if (null != loaderInfo.HostNameOrdinal)
                _hostName = record.GetNullableString(loaderInfo.HostNameOrdinal.Value);
            if (null != loaderInfo.ClientProcessIDOrdinal)
                _clientProcessID = record.GetNullableInt32(loaderInfo.ClientProcessIDOrdinal.Value);
            if (null != loaderInfo.ApplicationNameOrdinal)
                _applicationName = record.GetNullableString(loaderInfo.ApplicationNameOrdinal.Value);
            if (null != loaderInfo.LoginNameOrdinal)
                _loginName = record.GetNullableString(loaderInfo.LoginNameOrdinal.Value);
            if (null != loaderInfo.SPIDOrdinal)
                _sPID = record.GetNullableInt32(loaderInfo.SPIDOrdinal.Value);
            if (null != loaderInfo.StartTimeOrdinal)
                _startTime = record.GetNullableDateTime(loaderInfo.StartTimeOrdinal.Value);
            if (null != loaderInfo.EventSubClassOrdinal)
                _eventSubClass = record.GetNullableInt32(loaderInfo.EventSubClassOrdinal.Value);
            if (null != loaderInfo.SuccessOrdinal)
                _success = record.GetNullableInt32(loaderInfo.SuccessOrdinal.Value);
            if (null != loaderInfo.ServerNameOrdinal)
                _serverName = record.GetNullableString(loaderInfo.ServerNameOrdinal.Value);
            if (null != loaderInfo.ObjectTypeOrdinal)
                _objectType = record.GetNullableInt32(loaderInfo.ObjectTypeOrdinal.Value);
            if (null != loaderInfo.DatabaseNameOrdinal)
                _databaseName = record.GetNullableString(loaderInfo.DatabaseNameOrdinal.Value);
            if (null != loaderInfo.DBUserNameOrdinal)
                _dBUserName = record.GetNullableString(loaderInfo.DBUserNameOrdinal.Value);
            if (null != loaderInfo.LoginSidOrdinal)
                _loginSid = (Byte[])record.GetValue(loaderInfo.LoginSidOrdinal.Value);
            if (null != loaderInfo.TargetLoginNameOrdinal)
                _targetLoginName = record.GetNullableString(loaderInfo.TargetLoginNameOrdinal.Value);
            if (null != loaderInfo.TargetLoginSidOrdinal)
                _targetLoginSid = (Byte[])record.GetValue(loaderInfo.TargetLoginSidOrdinal.Value);
            if (null != loaderInfo.RequestIDOrdinal)
                _requestID = record.GetNullableInt32(loaderInfo.RequestIDOrdinal.Value);
            if (null != loaderInfo.XactSequenceOrdinal)
                _xactSequence = record.GetNullableInt64(loaderInfo.XactSequenceOrdinal.Value);
            if (null != loaderInfo.EventSequenceOrdinal)
                _eventSequence = record.GetNullableInt64(loaderInfo.EventSequenceOrdinal.Value);
            if (null != loaderInfo.IsSystemOrdinal)
                _isSystem = record.GetNullableInt32(loaderInfo.IsSystemOrdinal.Value);
            if (null != loaderInfo.SessionLoginNameOrdinal)
                _sessionLoginName = record.GetNullableString(loaderInfo.SessionLoginNameOrdinal.Value);
        }
Beispiel #18
0
 public AttachmentInfo(Int64? id, int mailId, string fileName, string contentType, string encoding, byte[] fileBuffer)
 {
     this._Id = id;
     this._MailId = mailId;
     this._FileName = fileName;
     this._ContentType = contentType;
     this._Encoding = encoding;
     this._FileBuffer = fileBuffer;
 }
        public Heartbeat(Analyzer analyzer, Int64? heartbeatInterval, AnalyzerTime analyzerTime, AdditionalData[] additionalData, string messageId)
            : this(analyzer)
        {
            this.messageId = string.IsNullOrEmpty(messageId) ? "0" : messageId;

            this.heartbeatInterval = heartbeatInterval;
            this.analyzerTime = analyzerTime;
            this.additionalData = additionalData;
        }
Beispiel #20
0
 private Assessment(Int64 id, String title, Int64 weight, String type, Int64? result, Int64? moduleId)
 {
     this._id = id;
     this._title = title;
     this._weight = weight;
     this._type = type;
     this._result = result;
     this._moduleId = moduleId;
 }
Beispiel #21
0
 public ContentInfo(Int64? id, int mailId, string contentType, string charset, string encoding, string content)
 {
     this._Id = id;
     this._MailId = mailId;
     this._ContentType = contentType;
     this._Charset = charset;
     this._Encoding = encoding;
     this._Content = content;
 }
        internal DatabaseMirroringLoginEvent(IDataRecord record, DatabaseMirroringLoginEventLoaderInfo loaderInfo)
        {
            Contract.Requires(null != record, "The record must be valid.");
            Contract.Requires(null != loaderInfo, "The loaderInfo must be valid.");

            if (null != loaderInfo.TextDataOrdinal)
                _textData = record.GetNullableString(loaderInfo.TextDataOrdinal.Value);
            if (null != loaderInfo.DatabaseIDOrdinal)
                _databaseID = record.GetNullableInt32(loaderInfo.DatabaseIDOrdinal.Value);
            if (null != loaderInfo.TransactionIDOrdinal)
                _transactionID = record.GetNullableInt64(loaderInfo.TransactionIDOrdinal.Value);
            if (null != loaderInfo.NTUserNameOrdinal)
                _nTUserName = record.GetNullableString(loaderInfo.NTUserNameOrdinal.Value);
            if (null != loaderInfo.NTDomainNameOrdinal)
                _nTDomainName = record.GetNullableString(loaderInfo.NTDomainNameOrdinal.Value);
            if (null != loaderInfo.HostNameOrdinal)
                _hostName = record.GetNullableString(loaderInfo.HostNameOrdinal.Value);
            if (null != loaderInfo.ClientProcessIDOrdinal)
                _clientProcessID = record.GetNullableInt32(loaderInfo.ClientProcessIDOrdinal.Value);
            if (null != loaderInfo.ApplicationNameOrdinal)
                _applicationName = record.GetNullableString(loaderInfo.ApplicationNameOrdinal.Value);
            if (null != loaderInfo.LoginNameOrdinal)
                _loginName = record.GetNullableString(loaderInfo.LoginNameOrdinal.Value);
            if (null != loaderInfo.SPIDOrdinal)
                _sPID = record.GetNullableInt32(loaderInfo.SPIDOrdinal.Value);
            if (null != loaderInfo.StartTimeOrdinal)
                _startTime = record.GetNullableDateTime(loaderInfo.StartTimeOrdinal.Value);
            if (null != loaderInfo.EventSubClassOrdinal)
                _eventSubClass = record.GetNullableInt32(loaderInfo.EventSubClassOrdinal.Value);
            if (null != loaderInfo.ServerNameOrdinal)
                _serverName = record.GetNullableString(loaderInfo.ServerNameOrdinal.Value);
            if (null != loaderInfo.StateOrdinal)
                _state = record.GetNullableInt32(loaderInfo.StateOrdinal.Value);
            if (null != loaderInfo.ObjectNameOrdinal)
                _objectName = record.GetNullableString(loaderInfo.ObjectNameOrdinal.Value);
            if (null != loaderInfo.FileNameOrdinal)
                _fileName = record.GetNullableString(loaderInfo.FileNameOrdinal.Value);
            if (null != loaderInfo.OwnerNameOrdinal)
                _ownerName = record.GetNullableString(loaderInfo.OwnerNameOrdinal.Value);
            if (null != loaderInfo.RoleNameOrdinal)
                _roleName = record.GetNullableString(loaderInfo.RoleNameOrdinal.Value);
            if (null != loaderInfo.TargetUserNameOrdinal)
                _targetUserName = record.GetNullableString(loaderInfo.TargetUserNameOrdinal.Value);
            if (null != loaderInfo.LoginSidOrdinal)
                _loginSid = (Byte[])record.GetValue(loaderInfo.LoginSidOrdinal.Value);
            if (null != loaderInfo.ProviderNameOrdinal)
                _providerName = record.GetNullableString(loaderInfo.ProviderNameOrdinal.Value);
            if (null != loaderInfo.EventSequenceOrdinal)
                _eventSequence = record.GetNullableInt64(loaderInfo.EventSequenceOrdinal.Value);
            if (null != loaderInfo.IsSystemOrdinal)
                _isSystem = record.GetNullableInt32(loaderInfo.IsSystemOrdinal.Value);
            if (null != loaderInfo.SessionLoginNameOrdinal)
                _sessionLoginName = record.GetNullableString(loaderInfo.SessionLoginNameOrdinal.Value);
        }
Beispiel #23
0
        /// <summary>
        /// Creates a new range of Int64 values.
        /// </summary>
        /// <param name="Min">The minimum value or lower bound.</param>
        /// <param name="Max">The maximum value or upper bound.</param>
        public Int64MinMax(Int64? Min, Int64? Max)
        {
            #region Initial checks

            if (Min.HasValue && Max.HasValue && Min > Max)
                throw new ArgumentException("The minimum must not be larger than the maximum!");

            #endregion

            _Min = Min;
            _Max = Max;
        }
 public SnmpService(string oid, Int64? messageProcessingModel, Int64? securityModel, string securityName,
     Int64? securityLevel, string contextName, string contextEngineID, string command)
 {
     this.oid = oid;
     this.messageProcessingModel = messageProcessingModel;
     this.securityModel = securityModel;
     this.securityName = securityName;
     this.securityLevel = securityLevel;
     this.contextName = contextName;
     this.contextEngineID = contextEngineID;
     this.command = command;
 }
Beispiel #25
0
 public Cep(string cep)
 {
     ValidationHelper.ForNullOrEmptyDefaultMessage("CEP", cep);
     cep = TextHelper.GetNumeros(cep);
     ValidationHelper.StringLength("CEP", CepMaxLength, cep);
     try
     {
         CepCod = Convert.ToInt64(cep);
     }
     catch (Exception)
     {
         throw new Exception("Cep inválido: " + cep);
     }
 }
        /// <summary>
        /// Pass double.Nan for any parameter to assign it to "not assigned", pass null to leave unchanged.
        /// </summary>
        public ModifyOrderMessage(AccountInfo account, Symbol symbol, string orderId, decimal? stopLoss, decimal? takeProfit, decimal? targetOpenPrice, DateTime? expiration)
            : base(account)
        {
            _symbol = symbol;
            _orderId = orderId;
            _takeProfit = takeProfit;
            _stopLoss = stopLoss;
            _targetOpenPrice = targetOpenPrice;

            if (_expiration.HasValue)
            {
                _expiration = GeneralHelper.GenerateSecondsDateTimeFrom1970(expiration.Value);
            }
        }
 VirtualHardDiskState(
     Int64 fileSize,
     bool inUse,
     Int64? minInternalSize,
     Int32 physicalSectorSize,
     Int32 alignment,
     Int32? fragmentationPercentage)
 {
     m_FileSize = fileSize;
     m_InUse = inUse;
     m_MinInternalSize = minInternalSize;
     m_PhysicalSectorSize = physicalSectorSize;
     m_Alignment = alignment;
     m_FragmentationPercentage = fragmentationPercentage;
 }
Beispiel #28
0
        public CEP(string cep)
        {
            Guard.ForNullOrEmpty(cep, "CEP não pode ser nulo ou em branco");
            cep = TextoHelper.GetNumeros(cep);
            Guard.StringLength("Tamanho do CEP excedido", cep, CepMaxLength);

            try
            {
                this._CepCod = Convert.ToInt64(cep);
            }
            catch (Exception)
            {
                throw new Exception("CEP Inválido");
            }
        }
Beispiel #29
0
 public File(string name, string path, DateTime? createTime, DateTime? modifyTime, DateTime? accessTime,
     Int64? dataSize, Int64? diskSize, FileAccess[] fileAccess, Linkage[] linkage, Inode inode,
     Checksum[] checksum, FileCategoryEnum category)
     : this(name, path, category)
 {
     this.createTime = createTime;
     this.modifyTime = modifyTime;
     this.accessTime = accessTime;
     this.dataSize = dataSize;
     this.diskSize = diskSize;
     this.fileAccess = fileAccess;
     this.linkage = linkage;
     this.inode = inode;
     this.checksum = checksum;
 }
Beispiel #30
0
 public Action(Action action)
 {
     FullyLoaded = action.FullyLoaded;
     Id = action.Id;
     Name = action.Name;
     Comment = action.Comment;
     ShowToCust = action.ShowToCust;
     EmailText = action.EmailText;
     EmailCsrList = action.EmailCsrList;
     EmailCustList = action.EmailCustList;
     TimeSpentHours = action.TimeSpentHours;
     TimeSpentMinutes = action.TimeSpentMinutes;
     AssignToQueue = action.AssignToQueue;
     AssignToCsr = action.AssignToCsr;
     Action_Attachments = action.Action_Attachments;
 }
Beispiel #31
0
 public static object AsSqlParameterValue(this Int64?dotNetValue, Int64 nullReplacement)
 {
     return(dotNetValue ?? nullReplacement);
 }
Beispiel #32
0
 public Loan(DateTime loandate, Copy copy, Member member, DateTime?returndate = null, Int64?id = null)
 {
     this.ID         = id;
     this.LoanDate   = loandate;
     this.ReturnDate = returndate;
     this.Copy       = copy;
     this.Member     = member;
 }
Beispiel #33
0
 public virtual List <SmphGisBaseReferenceTranslationLookup> SelectLookupList(DbManagerProxy manager
                                                                              , Int64?idfsCountry
                                                                              , String lang
                                                                              )
 {
     return(_SelectList(manager
                        , idfsCountry
                        , lang
                        , null, null
                        ));
 }
 /// <summary>
 /// Selects records as a collection (List) of Enquiry sorted by the sortByExpression starting from the startRowIndex, based on the search parameters
 /// </summary>
 public static List <Enquiry> SelectSkipAndTakeDynamicWhere(int?enquiryId, int?courseId, string studentName, Int64?contactNo, string comments, int rows, int startRowIndex, string sortByExpression)
 {
     sortByExpression = GetSortExpression(sortByExpression);
     return(EnquiryDataLayer.SelectSkipAndTakeDynamicWhere(enquiryId, courseId, studentName, contactNo, comments, sortByExpression, startRowIndex, rows));
 }
Beispiel #35
0
        private void اضافةصنفجديدToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmAddEmployees frm = new FrmAddEmployees();

            try
            {
                var result = _Jop.Where(Job => Job.IsDeleted == 0).ToList();
                if (result.Count > 0 && result != null)
                {
                    frm.slkJop.Properties.DataSource    = result;
                    frm.slkJop.Properties.ValueMember   = "Jop_Code";
                    frm.slkJop.Properties.DisplayMember = "JobName";
                    frm.slkJop.EditValue = result[0].Jop_Code;
                }
            }
            catch
            {
            }



            try
            {
                var result = _Department.Where(Department => Department.IsDeleted == 0).ToList();
                if (result.Count > 0 && result != null)
                {
                    //frm.slkDepartment.Properties.DataSource = result;
                    //frm.slkDepartment.Properties.ValueMember = "Department_Code";
                    //frm.slkDepartment.Properties.DisplayMember = "DepartmentName";
                    //frm.slkDepartment.EditValue = result[0].Department_Code;
                }
            }
            catch
            {
            }



            try
            {
                var result = _branches.Where(Branche => Branche.IsDeleted == 0).ToList();
                if (result.Count > 0 && result != null)
                {
                    frm.slkBranch.Properties.DataSource    = result;
                    frm.slkBranch.Properties.ValueMember   = "Branch_Code";
                    frm.slkBranch.Properties.DisplayMember = "BranchName";
                    frm.slkBranch.EditValue = result[0].Branch_Code;
                }
            }
            catch
            {
            }



            try
            {
                var result = _Gender.ToList();

                if (result.Count > 0 && result != null)
                {
                    frm.slkGender.Properties.DataSource    = result;
                    frm.slkGender.Properties.ValueMember   = "Gender_Id";
                    frm.slkGender.Properties.DisplayMember = "Gender_Name";
                    frm.slkGender.EditValue = result[0].Gender_Id;
                }
            }
            catch
            {
            }



            try
            {
                var result = _Nationality.Where(Nationalitie => Nationalitie.IsDeleted == 0).ToList();
                if (result.Count > 0 && result != null)
                {
                    frm.slkNational.Properties.DataSource    = result;
                    frm.slkNational.Properties.ValueMember   = "National_Code";
                    frm.slkNational.Properties.DisplayMember = "National_Name";
                    frm.slkNational.EditValue = result[0].Id;
                }
            }
            catch
            {
            }
            Int64?MaxCode = 1;

            if (_Employee_View != null && _Employee_View.Count > 0)
            {
                MaxCode = _Employee_View.Where(xx => xx.IsDeleted == 0).Max(u => (Int64?)u.Employee_Code + 1);
            }
            frm.txtEmpCode.Text = MaxCode.ToString();
            frm._Employee_View  = _Employee_View;
            frm.ShowDialog();
        }
Beispiel #36
0
 public LazyJsonInteger(Int64?value)
 {
     this.Value = value;
     this.Type  = LazyJsonType.Integer;
 }
Beispiel #37
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="property"></param>
 /// <param name="value"></param>
 /// <returns></returns>
 public static string GetArgumentFromNullableInt64Property(PropertyInfo property, Int64?value)
 {
     return(value.HasValue ? $"{GetPropertyName(property.Name)}:{value.Value}" : null);
 }
Beispiel #38
0
        public static SqlMessage INSERTUPDATE(INVOICE IV, Int64?DOCUMENTID_TMP, SqlTransaction tran, string TYPE, Int16?LANG_AUTOID)
        {
            SqlMessage sqlMessa = new SqlMessage();
            DataSet    ds       = (DataSet)SqlHelper.ExecuteDataset(null, tran, "SP_COMMON_INSERTUPDATECM_INVOICE",
                                                                    IV.IV_DOCUMENTID,
                                                                    IV.IV_DOCUMENTNUM,
                                                                    IV.IV_TYPE,
                                                                    IV.FICI_AUTOID,
                                                                    IV.TR_AUTOID,
                                                                    IV.CUR_AUTOID,
                                                                    IV.OBJ_AUTOID,
                                                                    IV.DOTY_AUTOID,
                                                                    IV.IV_SIGNEDBILL,
                                                                    IV.PTE_AUTOID,
                                                                    IV.IV_ISUSE,
                                                                    IV.IV_ISINVOICEVAT,
                                                                    IV.IV_ISPOST,
                                                                    IV.ST_AUTOID,
                                                                    IV.IV_CURENTCYRATE,
                                                                    IV.IV_USEIN,
                                                                    IV.PTE_DUEDATE,
                                                                    IV.IV_ITEMAMOUNT,
                                                                    IV.IV_ITEMBASEAMOUNT,
                                                                    IV.IV_VATAMOUNT,
                                                                    IV.IV_VATBASEAMOUNT,
                                                                    IV.IV_DISCOUNTPER,
                                                                    IV.IV_DISAMOUNT,
                                                                    IV.IV_DISBASEAMOUNT,
                                                                    IV.IV_REDUCEAMOUNT,
                                                                    IV.IV_REDUCEBASEAMOUNT,
                                                                    IV.IV_EXCISETAXAMOUNT,
                                                                    IV.IV_EXCISETAXBASEAMOUNT,
                                                                    IV.IV_IMEXPORTTAXAMOUNT,
                                                                    IV.IV_IMEXPORTTAXBASEAMOUNT,
                                                                    IV.IV_AMOUNT,
                                                                    IV.IV_BASEAMOUNT,
                                                                    IV.IV_BALANCE,
                                                                    IV.PTE_DESCRIPTION,
                                                                    IV.DOC_CREATEBY,
                                                                    IV.DOC_CREATEDATE,
                                                                    IV.DOC_UPDATEBY,
                                                                    IV.DOC_LASTUPDATE,
                                                                    IV.DOC_DOCUMENTDATE,
                                                                    IV.ORG_AUTOID,
                                                                    IV.DOC_DESCRIPTION,
                                                                    IV.DOC_OFSYSTEM,
                                                                    IV.DOC_OFSUBSYSTEM,
                                                                    DOCUMENTID_TMP,
                                                                    TYPE,
                                                                    LANG_AUTOID
                                                                    );

            if (ds != null)
            {
                if (ds.Tables.Count > 0)
                {
                    string error = ds.Tables[0].Rows[0]["ERROR"].ToString();
                    switch (error)
                    {
                    case "1":     // insert thành công
                    {
                        sqlMessa.Message  = "1";
                        sqlMessa.Status   = sqlMessagerType.Success;
                        sqlMessa.ResulObj = ds;
                    }
                    break;

                    case "2":     // update thanh công
                    {
                        sqlMessa.Message  = "2";
                        sqlMessa.Status   = sqlMessagerType.Success;
                        sqlMessa.ResulObj = ds;
                    }
                    break;

                    case "-2":     // dữ liệu đã bị xóa
                    {
                        sqlMessa.Message = "-2";
                        sqlMessa.Status  = sqlMessagerType.Success;
                    }
                    break;

                    case "0":     // lưu bị lỗi
                    {
                        sqlMessa.Status  = sqlMessagerType.Error;
                        sqlMessa.Message = "0";
                    }
                    break;
                    }
                }
            }
            return(sqlMessa);
        }
 public override void SetNullableInt64(object o, int index, Int64?value)
 {
     this[index].SetNullableInt64(o, value);
 }
        public ActionResult ProceedToCheckOutFinalOrder(int DeliveryMode, DateTime DeliveryDateTime, int PaymentOptionID, string Address1, string Address2, string City, int CountryID, string Province, Int64?Telephone, string Zip)
        {
            if (DeliveryMode == 3)
            {
                var userDetail = dbmeals.UserDetails.Where(x => x.UserId == WebSecurity.CurrentUserId).FirstOrDefault();
                if (userDetail != null)
                {
                    AddressList objAddressList = userDetail.AddressList;// dbmeals.AddressLists.Where(x => x.UserId == WebSecurity.CurrentUserId).OrderByDescending(y => y.DateUpdated).FirstOrDefault();
                    bool        isnew          = false;
                    if (objAddressList == null)
                    {
                        objAddressList = new AddressList();
                        isnew          = true;
                    }
                    objAddressList.UserId           = WebSecurity.CurrentUserId;
                    objAddressList.Address1         = Address1;
                    objAddressList.Address2         = Address2;
                    objAddressList.City             = City;
                    objAddressList.CountryID        = CountryID;
                    objAddressList.Province         = Province;
                    objAddressList.Telephone        = (Telephone.HasValue ? Telephone.ToString() : string.Empty);
                    objAddressList.IsBillingAddress = 1;
                    objAddressList.DateUpdated      = DateTime.Now;
                    if (isnew)
                    {
                        dbmeals.AddressLists.Add(objAddressList);
                        dbmeals.SaveChanges();
                    }
                }
            }
            Models.FunOrder order = new Models.FunOrder();
            order.Status           = (PaymentOptionID == 1) ? 1 : 0;
            order.UserId           = WebSecurity.CurrentUserId;
            order.DateCreated      = DateTime.Now;
            order.DateUpdated      = DateTime.Now;
            order.ActualPickUpTime = DeliveryDateTime;

            //delivery=1,pickup 2
            order.DeliveryMethodID    = DeliveryMode;
            order.PaymentOptionID     = PaymentOptionID;
            order.EstimatedPickupTime = DeliveryDateTime;
            List <TempOrderList> lstTempOrderList = dbmeals.TempOrderLists.Where(x => x.sessionId == Session.SessionID && x.userid == WebSecurity.CurrentUserId).ToList();

            foreach (TempOrderList TempOrderList in lstTempOrderList)
            {
                FunOrderDetail orderDetail = new FunOrderDetail();
                orderDetail.Quantity    = TempOrderList.qty;
                orderDetail.Description = TempOrderList.itemName;
                orderDetail.Price       = TempOrderList.lineitemcost;
                order.Total             = TempOrderList.TotalCost;
                order.FunOrderDetails.Add(orderDetail);
                int mealid       = Convert.ToInt32(TempOrderList.MealItemId);
                var activeMealAd = dbmeals.ActiveMealAds.Where(x => x.MealAdID == mealid).FirstOrDefault();
                if (activeMealAd != null)
                {
                    activeMealAd.Quantity = activeMealAd.Quantity - TempOrderList.qty;
                    dbmeals.SaveChanges();
                }
            }
            if (dbmeals.TempOrderLists.Where(x => x.sessionId == Session.SessionID && x.userid == WebSecurity.CurrentUserId) != null)
            {
                order.Total = dbmeals.TempOrderLists.Where(x => x.sessionId == Session.SessionID && x.userid == WebSecurity.CurrentUserId).Sum(y => (y == null) ? 0 : y.TotalCost);
            }
            dbmeals.FunOrders.Add(order);
            if (PaymentOptionID == 1)
            {
                foreach (TempOrderList tempData in dbmeals.TempOrderLists.Where(x => x.sessionId == Session.SessionID && x.userid == WebSecurity.CurrentUserId))
                {
                    // dbmeals.TempOrderLists.Remove(tempData);
                }
            }
            foreach (TempOrderList TempOrderList in lstTempOrderList)
            {
                int MealAdID     = Convert.ToInt32(TempOrderList.MealItemId);
                var activeMealAd = dbmeals.ActiveMealAds.Where(x => x.MealAdID == MealAdID).FirstOrDefault();
                if (activeMealAd != null)
                {
                    activeMealAd.Quantity = activeMealAd.Quantity - TempOrderList.qty;
                    dbmeals.SaveChanges();
                }
            }
            dbmeals.SaveChanges();
            int     orderid     = order.OrderID;
            decimal totalAmount = lstTempOrderList.Sum(x => x.TotalCost);
            var     data        = new { OrderId = orderid, amount = totalAmount, isCashPayment = PaymentOptionID == 1 };

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Beispiel #41
0
        private void SaveNote(IUnitOfWork uow, NoteRow note, string entityType, Int64 entityId, Int64?noteId)
        {
            note            = note.Clone();
            note.NoteId     = noteId;
            note.EntityType = entityType;
            note.EntityId   = entityId;
            note.InsertDate = null;
            note.ClearAssignment(NoteRow.Fields.InsertDate);

            var saveRequest = new SaveRequest <NoteRow> {
                Entity = note
            };

            if (noteId == null)
            {
                new NoteRepository().Create(uow, saveRequest);
            }
            else
            {
                new NoteRepository().Update(uow, saveRequest);
            }
        }
Beispiel #42
0
 public static Int64 ND(object val, Int64?default_val)
 {
     return(ND(val, default_val ?? 0));
 }
Beispiel #43
0
        private void windowsUIButtonPanel_ButtonClick(object sender, DevExpress.XtraBars.Docking2010.ButtonEventArgs e)
        {
            WindowsUIButton btn = e.Button as WindowsUIButton;

            if (btn.Caption == "جديد")
            {
                FrmAddEmployees frm = new FrmAddEmployees();
                try
                {
                    var result = _Jop.Where(Job => Job.IsDeleted == 0).ToList();
                    if (result.Count > 0 && result != null)
                    {
                        frm.slkJop.Properties.DataSource    = result;
                        frm.slkJop.Properties.ValueMember   = "Jop_Code";
                        frm.slkJop.Properties.DisplayMember = "JobName";
                        frm.slkJop.EditValue = result[0].Jop_Code;
                    }
                }
                catch
                {
                }



                try
                {
                    var result = _branches.Where(Branche => Branche.IsDeleted == 0).ToList();
                    if (result.Count > 0 && result != null)
                    {
                        frm.slkBranch.Properties.DataSource    = result;
                        frm.slkBranch.Properties.ValueMember   = "Branch_Code";
                        frm.slkBranch.Properties.DisplayMember = "BranchName";
                        frm.slkBranch.EditValue = result[0].Branch_Code;
                    }
                }
                catch
                {
                }



                try
                {
                    var result = _Gender.ToList();

                    if (result.Count > 0 && result != null)
                    {
                        frm.slkGender.Properties.DataSource    = result;
                        frm.slkGender.Properties.ValueMember   = "Gender_Id";
                        frm.slkGender.Properties.DisplayMember = "Gender_Name";
                        frm.slkGender.EditValue = result[0].Gender_Id;
                    }
                }
                catch
                {
                }



                try
                {
                    var result = _Nationality.Where(Nationalitie => Nationalitie.IsDeleted == 0).ToList();
                    if (result.Count > 0 && result != null)
                    {
                        frm.slkNational.Properties.DataSource    = result;
                        frm.slkNational.Properties.ValueMember   = "National_Code";
                        frm.slkNational.Properties.DisplayMember = "National_Name";
                        frm.slkNational.EditValue = result[0].Id;
                    }
                }
                catch
                {
                }



                Int64?MaxCode = 1;
                if (_Employee_View != null && _Employee_View.Count > 0)
                {
                    MaxCode = _Employee_View.Where(xx => xx.IsDeleted == 0).Max(u => (Int64?)u.Employee_Code + 1);
                }
                frm.txtEmpCode.Text = MaxCode.ToString();

                frm._Employee_View = _Employee_View;
                frm.ShowDialog();
            }
            else if (btn.Caption == "تعديل")
            {
                if (gvEmployeeCard.RowCount <= 0)
                {
                    return;
                }

                frmEditeEmployees frm = new frmEditeEmployees();
                var x = gvEmployeeCard.GetFocusedRow() as Employee_View;
                using (DB_A65D4E_SolarEnergyEntities context4 = new DB_A65D4E_SolarEnergyEntities())
                {
                    var emp = context.Employee_View.Where(xx => xx.IsDeleted == 0 && xx.Employee_Code == x.Employee_Code).SingleOrDefault();

                    frm.txtEmpCode.Text        = emp.Employee_Code.ToString();
                    frm.TxtEmpName.Text        = emp.EmployeeName.ToString();
                    frm.dtBrithDay.EditValue   = emp.Birthdate;
                    frm.TxtEmpNataionalId.Text = emp.National_Id.ToString();
                    frm.txtAdress1.Text        = emp.EmployeeAddress1.ToString();
                    frm.txtAdress2.Text        = emp.EmployeeAddress2.ToString();
                    frm.txtMob1.Text           = emp.Phone.ToString();
                    frm.txtMob2.Text           = emp.Phone2.ToString();
                    frm.txtLandLine.Text       = emp.LandLine.ToString();
                    frm.txtEmail.Text          = emp.Email.ToString();
                    frm.dtHiringDate.EditValue = emp.HiringDate;
                    try
                    {
                        var result = _Jop.Where(Job => Job.IsDeleted == 0).ToList();
                        if (result.Count > 0 && result != null)
                        {
                            frm.slkJop.Properties.DataSource    = result;
                            frm.slkJop.Properties.ValueMember   = "Jop_Code";
                            frm.slkJop.Properties.DisplayMember = "JobName";
                            frm.slkJop.EditValue = emp.Job_Code;
                        }
                    }
                    catch
                    {
                    }
                    try
                    {
                        var result = _branches.Where(Branche => Branche.IsDeleted == 0).ToList();
                        if (result.Count > 0 && result != null)
                        {
                            frm.slkBranch.Properties.DataSource    = result;
                            frm.slkBranch.Properties.ValueMember   = "Branch_Code";
                            frm.slkBranch.Properties.DisplayMember = "BranchName";
                            frm.slkBranch.EditValue = emp.Branch_Code;
                        }
                    }
                    catch
                    {
                    }
                    try
                    {
                        var result = _Gender.ToList();

                        if (result.Count > 0 && result != null)
                        {
                            frm.slkGender.Properties.DataSource    = result;
                            frm.slkGender.Properties.ValueMember   = "Gender_Id";
                            frm.slkGender.Properties.DisplayMember = "Gender_Name";
                            frm.slkGender.EditValue = emp.Gender_Id;
                        }
                    }
                    catch
                    {
                    }
                    try
                    {
                        var result = _Nationality.Where(Nationalitie => Nationalitie.IsDeleted == 0).ToList();
                        if (result.Count > 0 && result != null)
                        {
                            frm.slkNational.Properties.DataSource    = result;
                            frm.slkNational.Properties.ValueMember   = "National_Code";
                            frm.slkNational.Properties.DisplayMember = "National_Name";
                            frm.slkNational.EditValue = emp.Natinality_Code;
                        }
                    }
                    catch
                    {
                    }
                }
                frm.ShowDialog();
            }
            else if (btn.Caption == "خروج")
            {
                this.Close();
            }
            else if (btn.Caption == "حذف")
            {
                if (gvEmployeeCard.RowCount <= 0)
                {
                    return;
                }
                if (MaterialMessageBox.Show("تاكيد الحذف", MessageBoxButtons.YesNo) == DialogResult.OK)
                {
                    Employee_View xx         = gvEmployeeCard.GetFocusedRow() as Employee_View;
                    Employee      _Employees = new Employee();
                    using (DB_A65D4E_SolarEnergyEntities context2 = new DB_A65D4E_SolarEnergyEntities())
                    {
                        Employee employee = new Employee();
                        _Employees = context2.Employees.SingleOrDefault(item => item.Employee_Code == xx.Employee_Code && item.IsDeleted == 0);

                        _Employees.IsDeleted = 1;
                        context2.SaveChanges();
                    }
                }
                FillGride();
            }
            else if (btn.Caption == "تحديث")
            {
                using (DB_A65D4E_SolarEnergyEntities refershContext = new DB_A65D4E_SolarEnergyEntities())
                {
                    _branches = refershContext.Branches.Where(x => x.IsDeleted == 0).ToList();

                    _Jop         = refershContext.Jobs.Where(x => x.IsDeleted == 0).ToList();
                    _Nationality = refershContext.Nationalities.Where(x => x.IsDeleted == 0).ToList();

                    _Employee_View = refershContext.Employee_View.Where(x => x.IsDeleted == 0).ToList();

                    if (_Employee_View.Count > 0 && _Employee_View != null)
                    {
                        gcEmployeeCard.DataSource = null;
                        gcEmployeeCard.DataSource = _Employee_View;
                        gcEmployeeCard.RefreshDataSource();
                    }
                    else
                    {
                        gcEmployeeCard.Enabled = false;
                        windowsUIButtonPanel.Buttons.ForEach(x =>
                        {
                            if (x.Properties.Caption == "تعديل" || x.Properties.Caption == "طباعة" || x.Properties.Caption == "حذف")
                            {
                                x.Properties.Enabled = false;
                            }
                            if (x.Properties.Caption == "جديد")
                            {
                                x.Properties.Enabled = true;
                            }
                        });
                    }
                }
            }
            //else if (btn.Caption == "طباعة")
            //{
            //}
        }
        public void SaveRequestedData(
            TemplateNodeInfo templateNodeInfo,
            MultyQueryResultInfo results
            )
        {
            Debug.Assert(templateNodeInfo.IsInstance);

            long             requestId = this.CurrentStorage.MetaResultTable.GetMaxRequestId() + 1L;
            DateTime         timestamp = DateTime.Now;
            const long       sessionId = 1L;
            List <ITableRow> metaRows  = new List <ITableRow>();

            foreach (TemplateNodeResultItem nodeResult in results.List)
            {
                TemplateNodeQueryInfo templateNodeQuery = nodeResult.TemplateNodeQuery;
                QueryResultInfo       queryResult       = nodeResult.QueryResult;

                foreach (KeyValuePair <InstanceInfo, QueryInstanceResultInfo> instancePair in queryResult.InstancesResult)
                {
                    long                    totalRowsSaved      = 0L;
                    InstanceInfo            instance            = instancePair.Key;
                    QueryInstanceResultInfo queryInstanceResult = instancePair.Value;

                    Int64?queryId = CurrentStorage.QueryDirectory.GetQueryId(
                        templateNodeInfo,
                        templateNodeQuery,
                        instance,
                        timestamp,
                        false
                        );

                    Log.InfoFormat("Instance:'{0}';QueryId:'{1}'",
                                   instance,
                                   queryId
                                   );

                    if (queryInstanceResult.ErrorInfo == null)
                    {
                        IEnumerable <QueryDatabaseResultInfo> notEmptyResults = queryInstanceResult.DatabasesResult.Values
                                                                                .Where(d => d != null && d.DataTables != null);

                        foreach (QueryDatabaseResultInfo databaseResultInfo in notEmptyResults)
                        {
                            totalRowsSaved += SaveDatabaseResult(
                                templateNodeQuery,
                                instance,
                                databaseResultInfo,
                                queryId
                                );
                        }
                    }

                    ITableRow metaRow = this.CurrentStorage.MetaResultTable.GetMetaRow(
                        requestId,
                        sessionId,
                        timestamp,
                        queryInstanceResult,
                        queryId,
                        totalRowsSaved
                        );

                    metaRows.Add(metaRow);
                }
            }

            this.CurrentStorage.MetaResultTable.ReplaceRows(metaRows);
            this.CurrentStorage.ResetRowCountCache(templateNodeInfo);
        }
        protected void rbtTodas_Click(object sender, EventArgs e)
        {
            Int64?_idCentro = convertir.toNInt64(Session["getIdCentroUsr"]);

            cargarMovimientos(_idCentro, null);
        }
Beispiel #46
0
 void FromScriptInvalidateMeasurement(int DelayToMeasurementMilli)
 {
     FromScriptMeasurementInvalidationTime =
         Math.Max(FromScriptMeasurementInvalidationTime ?? int.MinValue, GetTimeStopwatch() + Math.Min(DelayToMeasurementMilli, 10000));
 }
Beispiel #47
0
 /// <summary>
 /// Append a json integer token at specified jPath
 /// </summary>
 /// <param name="jPath">The jPath location to append the token</param>
 /// <param name="value">The value of the json integer token</param>
 public void AppendInteger(String jPath, Int64?value)
 {
     AppendToken(jPath, new LazyJsonInteger(value));
 }
 /// <summary>
 /// Selects records based on the passed filters as a collection (List) of Enquiry.
 /// </summary>
 public static List <Enquiry> SelectAllDynamicWhere(int?enquiryId, int?courseId, string studentName, Int64?contactNo, string comments)
 {
     return(EnquiryDataLayer.SelectAllDynamicWhere(enquiryId, courseId, studentName, contactNo, comments));
 }
Beispiel #49
0
            public virtual List <SmphGisBaseReferenceTranslationLookup> _SelectListInternal(DbManagerProxy manager
                                                                                            , Int64?idfsCountry
                                                                                            , String lang
                                                                                            , on_action loading, on_action loaded
                                                                                            )
            {
                SmphGisBaseReferenceTranslationLookup _obj = null;

                try
                {
                    MapResultSet[] sets = new MapResultSet[1];
                    List <SmphGisBaseReferenceTranslationLookup> objs = new List <SmphGisBaseReferenceTranslationLookup>();
                    sets[0] = new MapResultSet(typeof(SmphGisBaseReferenceTranslationLookup), objs);

                    manager
                    .SetSpCommand("spSmphGisBaseReferenceTranslation_SelectLookup"
                                  , manager.Parameter("@idfsCountry", idfsCountry)
                                  , manager.Parameter("@lang", lang)
                                  )
                    .ExecuteResultSet(sets);
                    foreach (var obj in objs)
                    {
                        _obj     = obj;
                        obj.m_CS = m_CS;

                        if (loading != null)
                        {
                            loading(obj);
                        }
                        _SetupLoad(manager, obj);

                        if (loaded != null)
                        {
                            loaded(obj);
                        }
                    }

                    return(objs);
                }
                catch (DataException e)
                {
                    throw DbModelException.Create(_obj, e);
                }
            }
        public override void Post(HttpRequest Request, HttpResponse Response, params string[] PathParams)
        {
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
            Response.Cache.SetMaxAge(TimeSpan.Zero);

            JObject inputData = null;

            try
            {
                using (StreamReader reader = new StreamReader(Request.InputStream))
                {
                    using (JsonTextReader jsonReader = new JsonTextReader(reader))
                    {
                        inputData = JObject.Load(jsonReader);
                    }
                }
            }
            catch
            {
                RespondBadRequest(Response);
            }

            string email    = inputData.Value <string>(@"email") ?? "";
            string password = inputData.Value <string>(@"password") ?? "";

            Response.ContentType = @"application/json";

            Int64 AppUserId;

            AppMembership.AppUserAuthenticateResults res = AppMembership.AuthenticateAppUser(email, password, out AppUserId);
            switch (res)
            {
            case AppMembership.AppUserAuthenticateResults.Success:
            {
                AppUserAuthToken at = AuthTokens.GenerateAuthTokenForAppUserId(AppUserId, 0);

                try
                {
                    AppMembership.AppUserLoggedInAction(AppUserId);
                }
                catch { }

                using (StreamWriter streamWriter = new StreamWriter(Response.OutputStream))
                {
                    using (JsonTextWriter jsonWriter = new JsonTextWriter(streamWriter))
                    {
                        jsonWriter.WriteStartObject();

                        jsonWriter.WritePropertyName(@"access_token");
                        jsonWriter.WriteValue(AuthTokens.AccessToken(at));

                        jsonWriter.WritePropertyName(@"user_id");
                        jsonWriter.WriteValue(AppUserId);

                        Int64?cityId = AppUser.FetchByID(AppUserId).CityId;
                        jsonWriter.WritePropertyName(@"is_city_exists");
                        jsonWriter.WriteValue(cityId != null && cityId != 0);

                        jsonWriter.WriteEndObject();
                    }
                }
            }
            break;

            default:
            case AppMembership.AppUserAuthenticateResults.LoginError:
            {
                RespondBadRequest(Response);
            }
            break;

            case AppMembership.AppUserAuthenticateResults.NotVerified:
            {
                RespondError(Response, HttpStatusCode.Forbidden, @"not-verified");
            }
            break;

            case AppMembership.AppUserAuthenticateResults.NoMatch:
            {
                RespondError(Response, HttpStatusCode.Forbidden, @"no-match");
            }
            break;

            case AppMembership.AppUserAuthenticateResults.Locked:
            {
                RespondError(Response, HttpStatusCode.Forbidden, @"locked");
            }
            break;
            }
        }
 /// <summary>
 /// Gets the total number of records in the Enquiry table based on search parameters
 /// </summary>
 public static int GetRecordCountDynamicWhere(int?enquiryId, int?courseId, string studentName, Int64?contactNo, string comments)
 {
     return(EnquiryDataLayer.GetRecordCountDynamicWhere(enquiryId, courseId, studentName, contactNo, comments));
 }
        protected IFCImportOptions(IDictionary <String, String> options)
        {
            string intent = GetNamedStringOption(options, "Intent");

            if (!string.IsNullOrWhiteSpace(intent))
            {
                IFCImportIntent intentTemp;
                if (!Enum.TryParse <IFCImportIntent>(intent, out intentTemp))
                {
                    intentTemp = IFCImportIntent.Reference;
                }
                Intent = intentTemp;
            }

            string action = GetNamedStringOption(options, "Action");

            if (!string.IsNullOrWhiteSpace(action))
            {
                IFCImportAction actionTemp;
                if (!Enum.TryParse <IFCImportAction>(action, out actionTemp))
                {
                    actionTemp = IFCImportAction.Open;
                }
                Action = actionTemp;
            }

            bool?process3DGeometry = GetNamedBooleanOption(options, "Process3DGeometry");

            if (process3DGeometry.HasValue)
            {
                Process3DGeometry = process3DGeometry.Value;
            }

            // We have two Boolean options that control how we process bounding box geometry.  They work together as follows:
            // 1. AlwaysProcessBoundingBoxGeometry set to true: always import the bounding box geometry.
            // 2. If AlwaysProcessBoundingBoxGeometry is not set, or set to false:
            // 2a. If ProcessBoundingBoxGeometry is not set or set to true, import the bounding box geometry if there is no other representation available.
            // 2b. If ProcessBoundingBoxGeometry is set to false, completely ignore the bounding box geometry.
            bool?processBoundingBoxGeometry       = GetNamedBooleanOption(options, "ProcessBoundingBoxGeometry");
            bool?alwaysProcessBoundingBoxGeometry = GetNamedBooleanOption(options, "AlwaysProcessBoundingBoxGeometry");

            if (alwaysProcessBoundingBoxGeometry.HasValue && alwaysProcessBoundingBoxGeometry.Value)
            {
                ProcessBoundingBoxGeometry = IFCProcessBBoxOptions.Always;
            }
            else if (processBoundingBoxGeometry.HasValue)
            {
                ProcessBoundingBoxGeometry = processBoundingBoxGeometry.Value ? IFCProcessBBoxOptions.NoOtherGeometry : IFCProcessBBoxOptions.Never;
            }
            else
            {
                ProcessBoundingBoxGeometry = IFCProcessBBoxOptions.NoOtherGeometry;
            }

            bool?verboseLogging = GetNamedBooleanOption(options, "VerboseLogging");

            if (verboseLogging.HasValue)
            {
                VerboseLogging = verboseLogging.Value;
            }

            bool?forceImport = GetNamedBooleanOption(options, "ForceImport");

            if (forceImport.HasValue)
            {
                ForceImport = forceImport.Value;
            }

            bool?createLinkInstanceOnly = GetNamedBooleanOption(options, "CreateLinkInstanceOnly");

            if (createLinkInstanceOnly.HasValue)
            {
                CreateLinkInstanceOnly = createLinkInstanceOnly.Value;
            }

            string revitLinkFileName = GetNamedStringOption(options, "RevitLinkFileName");

            if (!string.IsNullOrWhiteSpace(revitLinkFileName))
            {
                RevitLinkFileName = revitLinkFileName;
            }

            Int64?fileSize = GetNamedInt64Option(options, "FileSize", false);

            if (fileSize.HasValue)
            {
                OriginalFileSize = fileSize.Value;
            }

            Int64?timestamp = GetNamedInt64Option(options, "FileModifiedTime", true);

            if (timestamp.HasValue)
            {
                OriginalTimeStamp = OriginalTimeStamp.AddSeconds(timestamp.Value);
            }
        }
Beispiel #53
0
 public frmParametroResumenCuentaCobrar(Int32 ClienteID) : this()
 {
     this.ClienteID = ClienteID;
 }
Beispiel #54
0
 public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, Int64?value, Int64 multiple)
 {
     if (null != value && value % multiple != 0)
     {
         await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel });
     }
 }
        /// <summary>
        /// Selects records based on the passed filters as a collection (List) of Enquiry sorted by the sort expression.
        /// </summary>
        public static List <Enquiry> SelectAllDynamicWhere(int?enquiryId, int?courseId, string studentName, Int64?contactNo, string comments, string sortByExpression)
        {
            List <Enquiry> objEnquiryCol = EnquiryDataLayer.SelectAllDynamicWhere(enquiryId, courseId, studentName, contactNo, comments);

            return(SortByExpression(objEnquiryCol, sortByExpression));
        }
Beispiel #56
0
 public static object AsSqlParameterValue(this Int64?dotNetValue)
 {
     return(dotNetValue ?? System.Data.SqlTypes.SqlInt64.Null);
 }
Beispiel #57
0
 public void Int64Param(Int64 age, Int64?age2)
 {
 }
 public RolePermission GetById(Int64?id)
 {
     return(this._dBContext.RolePermission.SingleOrDefault(m => m.Id == id));
 }
Beispiel #59
0
 public Int64?EchoNullableInt64(Int64?arg0)
 {
     return(arg0);
 }
 internal BinaryFormatter WriteNullableInt64(Int64?value)
 {
     WriteTypeID(TypeID.NullableInt64);
     WriteNullableValue(value.HasValue, () => this.Writer.WriteInt64(value.Value));
     return(this);
 }