public SubSubSubAccount GetSubSubSubAccountByCode(string accountCode)
 {
     try
     {
         CommandObj.CommandText = "UDSP_GetSubSubSubAccountByCode";
         CommandObj.CommandType = CommandType.StoredProcedure;
         CommandObj.Parameters.AddWithValue("@Code", accountCode);
         ConnectionObj.Open();
         SqlDataReader    reader  = CommandObj.ExecuteReader();
         SubSubSubAccount account = new SubSubSubAccount();
         if (reader.Read())
         {
             account = new SubSubSubAccount
             {
                 SubSubSubAccountId   = Convert.ToInt32(reader["SubSubSubAccountListId"]),
                 SubSubSubAccountName = reader["SubSubSubAccountName"].ToString(),
                 SubSubSubAccountCode = reader["SubSubSubAccountCode"].ToString(),
                 SubSubSubAccountType = Convert.ToString(reader["SubSubSubAccountType"])
             };
         }
         reader.Close();
         return(account);
     }
     catch (Exception e)
     {
         throw new Exception("Could not Collect sub sub sub Account by code", e);
     }
     finally
     {
         ConnectionObj.Close();
         CommandObj.Dispose();
         CommandObj.Parameters.Clear();
     }
 }
        public JsonResult GetSubSubSubAccountById(int subSubSubAccountId)
        {
            SubSubSubAccount account = _iCommonManager.GetSubSubSubAccountById(subSubSubAccountId);

            return(Json(account, JsonRequestBehavior.AllowGet));
        }
Example #3
0
        public JsonResult GetSubSubSubAccountById(int subSubSubAccountId)
        {
            SubSubSubAccount account = _iCommonManager.GetAllSubSubSubAccounts().ToList().Find(n => n.SubSubSubAccountId == subSubSubAccountId);

            return(Json(account, JsonRequestBehavior.AllowGet));
        }