public List <ContraEntryWithDrawlLookupDto> FederationContraEntryWithDrawlLookup()
        {
            List <ContraEntryWithDrawlLookupDto> lstFederationContraEntryWithDrawlLookupDto = new List <ContraEntryWithDrawlLookupDto>();
            List <uspFederationContraEntryWithDrawlLookup_Result> objFederationContraEntryWithDrawlLookup_Result = _dbContext.uspFederationContraEntryWithDrawlLookup().ToList();

            foreach (var contraEntryWithDrawlLokup in objFederationContraEntryWithDrawlLookup_Result)
            {
                ContraEntryWithDrawlLookupDto contraEntryWithDrawlLookupDto = Mapper.Map <uspFederationContraEntryWithDrawlLookup_Result, ContraEntryWithDrawlLookupDto>(contraEntryWithDrawlLokup);
                lstFederationContraEntryWithDrawlLookupDto.Add(contraEntryWithDrawlLookupDto);
            }
            return(lstFederationContraEntryWithDrawlLookupDto);
        }
Example #2
0
        public List <ContraEntryWithDrawlLookupDto> GroupContraEntryWithDrawlLookup(int groupId, int userId)
        {
            List <ContraEntryWithDrawlLookupDto> lstContraWithDraw = new List <ContraEntryWithDrawlLookupDto>();
            ContraEntryWithDrawlLookupDto        objContraWithDraw = null;

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

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

            while (dr.Read())
            {
                objContraWithDraw = new ContraEntryWithDrawlLookupDto();

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

                lstContraWithDraw.Add(objContraWithDraw);
            }

            return(lstContraWithDraw);
        }