示例#1
0
        //Procedures
        //procedure details
        public DataTable GetHomeMaster_SP(HomeSPModel ObjLGD)         //ftype=4,district,5-mandal 6-gp
        {
            try
            {
                cmd = new OracleCommand();
                cmd.InitialLONGFetchSize = 1000;
                cmd.CommandType          = CommandType.StoredProcedure;
                cmd.CommandText          = "GSWS_GET_HOME_DETAILS";
                cmd.Parameters.Add("PTYPE", OracleDbType.Int32).Value     = Convert.ToInt32(ObjLGD.PTYPE);
                cmd.Parameters.Add("PDIST", OracleDbType.Int32).Value     = Convert.ToInt32(ObjLGD.PDIST);
                cmd.Parameters.Add("PRANGE_CD", OracleDbType.Int32).Value = Convert.ToInt32(ObjLGD.PRANGE_CD);

                cmd.Parameters.Add("P_CUR", OracleDbType.RefCursor).Direction = ParameterDirection.Output;
                DataTable dtLogin = clda.GetgswsDataAdapter(cmd);
                if (dtLogin != null)
                {
                    return(dtLogin);
                }
                else
                {
                    return(null);
                }
            }
            catch (Exception ex)
            {
                string mappath   = HttpContext.Current.Server.MapPath("HOME_MAstersSP");
                Task   WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_ReportLog_Exception(mappath, "Error From GetHomeMaster_SP:" + ex.Message.ToString()));
                throw ex;
            }
        }
示例#2
0
        //Districts Load
        public dynamic Getdistricts(HomeSPModel objinpt)
        {
            dynamic   objdist = new ExpandoObject();
            DataTable dt_null = new DataTable();

            try
            {
                DataTable dt_dist = GetHomeMaster_SP(objinpt);

                if (dt_dist != null)
                {
                    objdist.Status = "Success";
                    objdist.Reason = "";
                    objdist.Data   = dt_dist;
                }
                else
                {
                    objdist.Status = "Failure";
                    objdist.Reason = "";
                    objdist.Data   = dt_null;
                }
            }
            catch (Exception ex)
            {
                objdist.Status = "Failure";
                objdist.Reason = "";
                objdist.Data   = dt_null;
            }
            return(objdist);
        }
        public IHttpActionResult GetLHMSDistrictData(dynamic data)
        {
            string jsondata = token_gen.Authorize_aesdecrpty(data);

            //string jsondata = JsonConvert.SerializeObject(data);
            try
            {
                HomeSPModel val = JsonConvert.DeserializeObject <HomeSPModel>(jsondata);
                return(Ok(_lhms.GetLHMSDistrictData(val)));
            }
            catch (Exception ex)
            {
                throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.BadRequest, ex.Message));
            }
        }
示例#4
0
        public dynamic GetLHMSDistrictData(HomeSPModel obj)
        {
            try
            {
                var data = GetEchallansData("http://appolice.co.in/lhms/api/v1/getAppMasterService?token=" + "IU56jhgu567JGJH7", "");
                return(JsonConvert.DeserializeObject <dynamic>(data));
            }
            catch (Exception ex)
            {
                string mappath   = HttpContext.Current.Server.MapPath("HomeExceptionLogs");
                Task   WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_Log_Exception(mappath, "GetMissedPersons:" + ex.Message.ToString()));

                throw ex;
            }
        }