예제 #1
0
 public DataTable GetSpandanaMasterDetails(Seccmastermodel oj)
 {
     try
     {
         cmd = new OracleCommand();
         cmd.InitialLONGFetchSize = 1000;
         cmd.CommandType          = CommandType.StoredProcedure;
         cmd.CommandText          = "gsws_spandana_sec_mapping_proc";
         cmd.Parameters.Add("ftype", OracleDbType.Varchar2, 12).Value    = oj.Ftype;
         cmd.Parameters.Add("fdist", OracleDbType.Varchar2, 12).Value    = oj.Fdistrict;
         cmd.Parameters.Add("fmandal", OracleDbType.Varchar2, 12).Value  = oj.Fmandal;
         cmd.Parameters.Add("fvillage", OracleDbType.Varchar2, 12).Value = oj.Fvillage;
         cmd.Parameters.Add("frural", OracleDbType.Varchar2, 20).Value   = oj.Fruflag;
         cmd.Parameters.Add("P_CUR", OracleDbType.RefCursor).Direction   = ParameterDirection.Output;
         DataTable dtstatus = comhel.GetgswsDataAdapter(cmd);
         if (dtstatus != null && dtstatus.Rows.Count > 0)
         {
             return(dtstatus);
         }
         else
         {
             return(null);
         }
     }
     catch (Exception ex)
     {
         string mappath   = HttpContext.Current.Server.MapPath("RevenueExceptionLogs");
         Task   WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_ReportLog_Exception(mappath, "Error From GetApplicantStatus:" + ex.Message.ToString()));
         throw ex;
     }
 }
예제 #2
0
        public dynamic GetSeccMaster(Seccmastermodel oj)
        {
            dynamic         obj          = new ExpandoObject();
            RevenueSPHelper Revenuesphel = new RevenueSPHelper();
            DataTable       dt           = new DataTable();

            try
            {
                dt = Revenuesphel.GetSeccMasterDetails(oj);


                if (dt != null && dt.Rows.Count > 0)
                {
                    obj.Status  = "100";
                    obj.Reason  = "";
                    obj.Details = dt;
                }
                else
                {
                    obj.Status = "102";
                    obj.Reason = "No Data Found";
                }
            }
            catch (Exception ex)
            {
                obj.Status = "Failure";
                obj.Reason = CommonSPHel.ThirdpartyMessage;
            }
            return(obj);
        }
예제 #3
0
        public IHttpActionResult GetSeccMaster(dynamic data)
        {
            string value = token_gen.Authorize_aesdecrpty(data);

            try
            {
                //string value = JsonConvert.SerializeObject(data);
                Seccmastermodel rootobj = JsonConvert.DeserializeObject <Seccmastermodel>(value);

                return(Ok(Revenuehel.GetSeccMaster(rootobj)));
            }
            catch (Exception ex)
            {
                CatchData.Status = "Failure";
                CatchData.Reason = CommonSPHel.ThirdpartyMessage;
                return(Ok(CatchData));
            }
        }