Beispiel #1
0
        public GeneralEntity GetGeneralByRefdateAndReftype(GeneralEntity objGeneralEntity)
        {
            const string procedures = @"uspGet_GeneralVoucher_ByRefNo";

            object[] parms = { "@RefNo", objGeneralEntity.RefNo };
            return(Db.Read(procedures, true, Make, parms));
        }
Beispiel #2
0
        public string DeleteGeneral(GeneralEntity general)
        {
            const string procedures = @"uspDelete_GeneralVoucher_ByRefID";

            object[] parms = { "@RefID", general.RefId };
            return(Db.Delete(procedures, true, parms));
        }
Beispiel #3
0
        /// <summary>
        ///  Overridden Equals method.
        /// </summary>
        /// <param name="obj"> The second operand for compare.</param>
        /// <returns> True if both operands are equals, or false if not equals. </returns>
        public override bool Equals(object obj)
        {
            GeneralEntity resultConverting = obj as GeneralEntity;

            if (resultConverting != null)
            {
                return(UniqueIdentifier == resultConverting.UniqueIdentifier);
            }
            return(false);
        }
Beispiel #4
0
        internal bool AuthenticateAccess(string FCMBAppKey, string FCMBSecretKey)
        {
            //    var ipEntry = Dns.GetHostEntry(Dns.GetHostName());
            //    IPAddress[] addr = ipEntry.AddressList;
            AuthenticationRequest authenticationRequest = new AuthenticationRequest();

            authenticationRequest.AppID  = FCMBAppKey;
            authenticationRequest.Appkey = FCMBSecretKey;
            //authenticationRequest.ClientIP = addr[2].ToString();
            GeneralEntity generalEntity = new GeneralEntity();

            return(generalEntity.isClientAuthenticated(authenticationRequest) ? true : false);
        }
Beispiel #5
0
        internal bool AuthenticateAccess(string[] auth, string clientIP)
        {
            var ipEntry = Dns.GetHostEntry(Dns.GetHostName());

            IPAddress[]           addr = ipEntry.AddressList;
            AuthenticationRequest authenticationRequest = new AuthenticationRequest();

            authenticationRequest.AppID    = auth[0];
            authenticationRequest.Appkey   = auth[1];
            authenticationRequest.ClientIP = clientIP;
            GeneralEntity generalEntity = new GeneralEntity();

            return(generalEntity.isClientAuthenticated(authenticationRequest) ? true : false);
        }
Beispiel #6
0
 private object[] Take(GeneralEntity take)
 {
     return(new object[]
     {
         "@RefID", take.RefId,
         "@RefTypeID", take.RefTypeId,
         "@RefNo", take.RefNo,
         "@RefDate", take.RefDate,
         "@PostedDate", take.PostedDate,
         "@JournalMemo", take.JournalMemo,
         "@TotalAmountOC", take.TotalAmountOc,
         "@TotalAmountExchange", take.TotalAmountExchange,
         "@DepositID", take.DepositId,
         "@CashID", take.CashId
     });
 }
Beispiel #7
0
 internal TransactionModel isTransactionPersisted(TransactionRequest model, string FCMBAppKey)
 {
     generalEntity = new GeneralEntity();
     return(generalEntity.isTransactionPersisted(model, FCMBAppKey));
 }
 internal static GeneralVocherModel FromDataTransferObject(GeneralEntity entity)
 {
     return(entity == null ? null : AutoMapper.Mapper.Map <GeneralEntity, GeneralVocherModel>(entity));
 }
Beispiel #9
0
        public string UpdateGeneral(GeneralEntity general)
        {
            const string procedures = @"uspUpdate_GeneralVoucher";

            return(Db.Update(procedures, true, Take(general)));
        }
Beispiel #10
0
        public int InsertGeneral(GeneralEntity general)
        {
            const string procedures = @"uspInsert_GeneralVoucher";

            return(Db.Insert(procedures, true, Take(general)));
        }