public IHttpActionResult DemoAPI(dynamic data)
        {
            string    serialized_data = JsonConvert.SerializeObject(data);
            DemoModel obj             = JsonConvert.DeserializeObject <DemoModel>(serialized_data);

            return(Ok(_Hel.DemoAPI(obj)));
        }
Beispiel #2
0
        //public object DepartmentEnum { get; private set; }

        //CommonSPHel _comhel = new CommonSPHel();
        public DataTable DemoAPI(DemoModel objrb)
        {
            try
            {
                cmd = new OracleCommand();
                cmd.InitialLONGFetchSize = 1000;
                cmd.CommandType          = CommandType.StoredProcedure;
                cmd.CommandText          = "RB_SP_OWNERS_DETAILS";
                cmd.Parameters.Add("P_TYPE", OracleDbType.Varchar2, 12).Value      = objrb.Ftype;
                cmd.Parameters.Add("P_DISTRICT", OracleDbType.Varchar2, 20).Value  = objrb.FDistrict;
                cmd.Parameters.Add("P_MANDAL", OracleDbType.Varchar2, 20).Value    = objrb.FMandal;
                cmd.Parameters.Add("P_VILLAGE", OracleDbType.Varchar2, 20).Value   = objrb.FVillage;
                cmd.Parameters.Add("P_KATHA_NO", OracleDbType.Varchar2, 20).Value  = objrb.FKathano;
                cmd.Parameters.Add("P_UNIQUE_ID", OracleDbType.Varchar2, 50).Value = objrb.FUID;
                cmd.Parameters.Add("P_CUR", OracleDbType.RefCursor).Direction      = ParameterDirection.Output;
                DataTable dtApproval = GetspsDataAdapter(cmd);
                if (dtApproval != null && dtApproval.Rows.Count > 0)
                {
                    return(dtApproval);
                }
                else
                {
                    return(null);
                }
            }
            catch (Exception ex)
            {
                string mappath   = HttpContext.Current.Server.MapPath("MandalExceptionLogs");
                Task   WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_ReportLog_Exception(mappath, "Error From GetMandaApprovalReport_Sp:" + ex.Message.ToString()));
                throw ex;                //throw ex;
            }
        }