Esempio n. 1
0
        public Task <bool> UpdateUploadsDataAsync(UploadDataEntity uploadData)
        {
            bool result = uploadDataTable.UpdateUploadsDataAccount(uploadData);

            result = uploadDataTable.UpdateUploadsData(uploadData);

            return(Task.FromResult <bool>(result));
        }
Esempio n. 2
0
        public bool UpdateUploadsDataAccount(UploadDataEntity uploadData)
        {
            string commandText = "Update uploadsdata set AccountNumber = @accountNo where Id = @id and UploadId = @uploadId ";
            Dictionary <string, object> parameters = new Dictionary <string, object>();

            parameters.Add("@uploadId", uploadData.UploadId);
            parameters.Add("@accountNo", uploadData.AccountNumber);
            parameters.Add("@id", uploadData.Id);

            return(_database.Execute(commandText, parameters) > 0);
        }
Esempio n. 3
0
        /// <summary>
        /// Update an uploaded data in the uploadsdata table
        /// </summary>
        /// <param name="uploaddata">The uploaded data</param>
        /// <returns></returns>
        ///
        public bool UpdateUploadsData(UploadDataEntity uploadData)
        {
            string commandText = "Update uploadsdata set Narration = @narration, Status = 1 where UploadId = @uploadId and TranID like @tranId ";
            Dictionary <string, object> parameters = new Dictionary <string, object>();

            parameters.Add("@uploadId", uploadData.UploadId);
            parameters.Add("@tranId", string.Format("{0}__", uploadData.TranID.Substring(0, 8)));
            parameters.Add("@narration", uploadData.Narration);

            return(_database.Execute(commandText, parameters) > 0);
        }
Esempio n. 4
0
        /// <summary>
        /// Inserts a upload data record in the UploadData table
        /// </summary>
        /// <param name="uploaddata">The upload data record</param>
        /// <returns></returns>
        public int Insert(UploadDataEntity uploaddata)
        {
            string commandText = "Insert into uploadsdata (Id, UploadId, Narration, Amount, AccountNumber, DebitOrCredit, PostingCode, TranDate, Status, TranID) values (@Id, @uploadId, @narration, @amount, @accountNo, @debitcredit, @postingCode, @tranDate, @status, @tranId)";
            Dictionary <string, object> parameters = new Dictionary <string, object>();

            parameters.Add("@Id", uploaddata.Id);
            parameters.Add("@uploadId", uploaddata.UploadId);
            parameters.Add("@narration", uploaddata.Narration);
            parameters.Add("@amount", uploaddata.Amount);
            parameters.Add("@accountNo", uploaddata.AccountNumber);
            parameters.Add("@debitcredit", uploaddata.Debit1Credit0);
            parameters.Add("@postingCode", uploaddata.PostingCode);
            parameters.Add("@tranDate", uploaddata.TranDate);
            parameters.Add("@status", uploaddata.Status);
            parameters.Add("@tranId", uploaddata.TranID);

            return(_database.Execute(commandText, parameters));
        }