public ActionResult GroupOtherReceiptView(string id) { int AccountmasterId = DecryptQueryString(id); if (AccountmasterId < 1) { return(RedirectToAction("GroupOtherReceiptLookUp")); } GroupOtherReceiptViewDto viewDto = _groupOtherReceiptService.GroupOtherReceiptView(AccountmasterId); return(View(viewDto)); }
public GroupOtherReceiptViewDto GroupOtherReceiptView(int AccountMasterId) { SqlConnection con = new SqlConnection(DBConstants.MFIS_CS); GroupOtherReceiptViewDto viewdto = null; try { SqlCommand cmd = new SqlCommand(ProcNames.uspGroupOtherReceiptView, con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@AccountMasterId", AccountMasterId); con.Open(); SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read()) { viewdto = new GroupOtherReceiptViewDto(); viewdto.Amount = Convert.ToDecimal(dr["Amount"]); if (dr["ChequeDate"] != DBNull.Value) { viewdto.ChequeDate = Convert.ToDateTime(dr["ChequeDate"]); } viewdto.ChequeNumber = Convert.ToString(dr["ChequeNumber"]); viewdto.CollectionAgent = Convert.ToString(dr["EmployeeName"]); viewdto.GLAccountName = Convert.ToString(dr["GlAccount"]); viewdto.SLAccountName = Convert.ToString(dr["SlAccount"]); viewdto.TransactionDate = Convert.ToDateTime(dr["TransactionDate"]); viewdto.TransactionMode = Convert.ToString(dr["TransactionMode"]); viewdto.VoucherNumber = Convert.ToString(dr["VoucherNumber"]); viewdto.VoucherRefNumber = Convert.ToString(dr["VoucherRefNumber"]); viewdto.BankName = Convert.ToString(dr["ToAccountHead"]); } } catch (Exception ex) { throw ex; } return(viewdto); }
public GroupOtherReceiptViewDto GroupOtherReceiptView(int AccountMasterId) { GroupOtherReceiptViewDto viewDto = _groupOtherReceiptDal.GroupOtherReceiptView(AccountMasterId); return(viewDto); }