public List <ContraEntryDepositedLookupDto> FederationContraEntryDepositedLookup()
        {
            List <ContraEntryDepositedLookupDto> lstContraEntryDepositedLookupDto = new List <ContraEntryDepositedLookupDto>();
            List <uspFederationContraEntryDepositedLookup_Result> uspContraEntryDepositedLookup_Result = _dbContext.uspFederationContraEntryDepositedLookup().ToList();

            foreach (var contraEntryDepositedLokup in uspContraEntryDepositedLookup_Result)
            {
                ContraEntryDepositedLookupDto contraEntryDepositedLookupDto = Mapper.Map <uspFederationContraEntryDepositedLookup_Result, ContraEntryDepositedLookupDto>(contraEntryDepositedLokup);
                lstContraEntryDepositedLookupDto.Add(contraEntryDepositedLookupDto);
            }
            return(lstContraEntryDepositedLookupDto);
        }
Beispiel #2
0
        public List <ContraEntryDepositedLookupDto> GroupContraEntryDepositedLookup(int groupId, int userId)
        {
            List <ContraEntryDepositedLookupDto> lstContraDeposit = new List <ContraEntryDepositedLookupDto>();
            ContraEntryDepositedLookupDto        objContraDeposit = null;

            SqlConnection con = new SqlConnection(DBConstants.MFIS_CS);
            SqlCommand    cmd = new SqlCommand("uspGroupContraEntryDepositedLookup", con);

            cmd.Parameters.AddWithValue("@GroupId", groupId);
            cmd.Parameters.AddWithValue("@UserId", userId);
            cmd.CommandType = CommandType.StoredProcedure;
            con.Open();
            SqlDataReader dr = cmd.ExecuteReader();

            while (dr.Read())
            {
                objContraDeposit = new ContraEntryDepositedLookupDto();

                objContraDeposit.AccountMasterID = Convert.ToInt32(dr["AccountMasterID"]);
                objContraDeposit.VoucherNumber   = Convert.ToString(dr["VoucherNumber"]);
                objContraDeposit.AHName          = Convert.ToString(dr["AHName"]);
                objContraDeposit.TransactionDate = Convert.ToDateTime(dr["TransactionDate"]);
                objContraDeposit.Amount          = Convert.ToDecimal(dr["Amount"]);
                objContraDeposit.Narration       = Convert.ToString(dr["Narration"]);
                objContraDeposit.StatusCode      = Convert.ToString(dr["StatusCode"]);
                objContraDeposit.Status          = Convert.ToString(dr["Status"]);
                objContraDeposit.IsEdit          = Convert.ToBoolean(dr["CanEdit"]);
                objContraDeposit.IsDelete        = Convert.ToBoolean(dr["CanDelete"]);
                objContraDeposit.LockStatus      = Convert.ToString(dr["LockStatus"]);
                objContraDeposit.LockStatusCode  = Convert.ToString(dr["LockStatusCode"]);

                lstContraDeposit.Add(objContraDeposit);
            }

            return(lstContraDeposit);
        }