public IActionResult FetchStudioStartupInfo([FromBody] StudioStartupObj Obj) { IActionResult response; StudioStartupInfo resp = new StudioStartupInfo(); //Func<DataTable> funcGetSettings = () => ObjResponseDAO.FetchStudioStartupInfo(); //DataTable dt = CacheHelper.Get(funcGetSettings, "SITE_SETTING", "100002", "", false); try { StudioDAO ObjResponseDAO = new StudioDAO(_ConStr); DataSet ds = ObjResponseDAO.FetchStudioStartupInfo(Obj); resp.statuscode = (int)Common.ResponseStatusCode.Success; resp.message = "success"; resp.studio_id = int.Parse(ds.Tables[0].Rows[0]["studio_id"].ToString()); resp.studio_title = ds.Tables[0].Rows[0]["studio_title"].ToString(); resp.api_key = ds.Tables[0].Rows[0]["api_key"].ToString(); resp.lg_logo_name = ds.Tables[0].Rows[0]["lg_logo_name"].ToString(); resp.md_logo_name = ds.Tables[0].Rows[0]["md_logo_name"].ToString(); resp.sm_logo_name = ds.Tables[0].Rows[0]["sm_logo_name"].ToString(); resp.fav_icon_name = ds.Tables[0].Rows[0]["fav_icon_name"].ToString(); response = Ok(resp); } catch (Exception ex) { Common c = new Common(); ExceptionObj exobj = c.GetExceptionObjBase(ex); exobj.form_name = "StudioController"; exobj.page_url = "api/Studio/FetchStudioStartupInfo"; int ReturnVal; string ReturnMsg; ExceptionDAO exd = new ExceptionDAO(_ConStr); exd.SetExceptionLog("", exobj, out ReturnVal, out ReturnMsg); resp.statuscode = (int)Common.ResponseStatusCode.Exception; resp.message = ex.Message.ToString(); response = BadRequest(resp); } return(response); }
public DataSet FetchStudioStartupInfo(StudioStartupObj Obj) { DataSet ds = null; try { List <DBParameter> pList = new List <DBParameter>(); pList.Add(new DBParameter("studio_id", SqlDbType.BigInt, 0, ParameterDirection.Input, Obj.studio_id)); pList.Add(new DBParameter("web_app_url", SqlDbType.VarChar, 1000, ParameterDirection.Input, Obj.web_app_url)); objDAO = new DAO(_constr); ds = objDAO.GetDataSet("dbo.Get_STUDIO_Startup_Info", DAO.QueryType.StoredProcedure, pList); return(ds); } catch (Exception) { throw; } }