コード例 #1
0
        public dynamic IssuesTrackingReport(issueTrackingModel oj)
        {
            dynamic obj = new ExpandoObject();

            try
            {
                DataTable dt = IssuesTrackingReportProc(oj);
                if (dt != null && dt.Rows.Count > 0)
                {
                    obj.Status  = "Success";
                    obj.Reason  = "";
                    obj.Details = dt;
                }
                else
                {
                    obj.Status = "Failure";
                    obj.Reason = "No Data Found";
                }
            }
            catch (Exception ex)
            {
                obj.Status = "Failure";
                obj.Reason = ex.Message;
                return(obj);
            }
            return(obj);
        }
コード例 #2
0
 public IHttpActionResult IssuesTrackingReport(dynamic data)
 {
     try
     {
         //string value = token_gen.Authorize_aesdecrpty(data);
         string             value   = JsonConvert.SerializeObject(data);
         issueTrackingModel rootobj = JsonConvert.DeserializeObject <issueTrackingModel>(value);
         rootobj.TYPE = "1";
         return(Ok(Internalhel.IssuesTrackingReport(rootobj)));
     }
     catch (Exception ex)
     {
         CatchData.Status = "Failure";
         CatchData.Reason = ex.Message;
         return(Ok(CatchData));
     }
 }
コード例 #3
0
 public DataTable IssuesTrackingReportProc(issueTrackingModel obj)
 {
     try
     {
         ConnectionHelper _conHe = new ConnectionHelper();
         using (OracleConnection con = new OracleConnection(_conHe.Congsws))
         {
             using (OracleCommand cmd = new OracleCommand())
             {
                 cmd.Connection           = con;
                 cmd.InitialLONGFetchSize = 1000;
                 cmd.CommandType          = CommandType.StoredProcedure;
                 cmd.CommandText          = "GSWS_GET_RPT_ISSUES_CMTS_PROC";
                 cmd.Parameters.Add("PTYPE", OracleDbType.Varchar2).Value      = obj.TYPE;
                 cmd.Parameters.Add("PDIST", OracleDbType.Varchar2).Value      = obj.DISTRICT_ID;
                 cmd.Parameters.Add("PMANDAL", OracleDbType.Varchar2).Value    = obj.MANDAL_ID;
                 cmd.Parameters.Add("PSEC", OracleDbType.Varchar2).Value       = obj.SECRETARIAT_ID;
                 cmd.Parameters.Add("PUSER", OracleDbType.Varchar2).Value      = obj.USER;
                 cmd.Parameters.Add("P_CUR", OracleDbType.RefCursor).Direction = ParameterDirection.Output;
                 OracleDataAdapter adp = new OracleDataAdapter(cmd);
                 cmd.CommandTimeout = 0;
                 DataTable dt = new DataTable();
                 adp.Fill(dt);
                 if (dt != null && dt.Rows.Count > 0)
                 {
                     return(dt);
                 }
                 else
                 {
                     return(null);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         string mappath   = HttpContext.Current.Server.MapPath("InternalURLExceptionLogs");
         Task   WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_ReportLog_Exception(mappath, "Error From LoadDepartments:" + ex.Message.ToString()));
         throw ex;
     }
 }