Esempio n. 1
0
        public dynamic SaveReOpenTicket_Helper(FeedBackReport obj)
        {
            dynamic objupdate = new ExpandoObject();

            try
            {
                string Status = SaveReOpenTicket_Helper_SP(obj);

                if (Status == "Success")
                {
                    objupdate.Status = "100";
                    objupdate.Reason = "Token Re-open Successfully.";
                }
                else
                {
                    objupdate.Status = "102";
                    objupdate.Reason = "Data Not Submitted Please Try Again";
                }
            }
            catch (Exception ex)
            {
                objupdate.Status = "102";
                objupdate.Reason = ex.Message;
            }
            return(objupdate);
        }
Esempio n. 2
0
        public dynamic PostFeedbackdata(FeedBackReport obj)
        {
            dynamic objupdate = new ExpandoObject();

            try
            {
                obj.REPORTID = obj.SECRETRIATID + DateTime.Now.ToString("ddMMyyHHmmssfff");
                string Status = SaveFeedbackReport(obj);

                if (Status == "Success")
                {
                    objupdate.Status = "100";
                    objupdate.Reason = "Your Record Updated Successfully!Your Token ID is" + "  " + obj.REPORTID;
                }
                else
                {
                    objupdate.Status = "102";
                    objupdate.Reason = "Data Not Submitted Please Try Again";
                }
            }
            catch (Exception ex)
            {
                objupdate.Status = "102";
                objupdate.Reason = ex.Message;
            }
            return(objupdate);
        }
Esempio n. 3
0
 public String SaveReOpenTicket_Helper_SP(FeedBackReport obj)
 {
     try
     {
         //obj.REPORTID = obj.SECRETRIATID + DateTime.Now.ToString("ddMMyyHHmmssfff");
         cmd             = new OracleCommand();
         cmd.CommandText = @"update GSWS_REPORT_ISSUES set REOPEN_DATE=sysdate, REOPEN_BY = :USER_NAME,REOPEN_REASONS=:REMARKS,comp_status=:comp_status where REPORT_ID= :REPORT_ID";
         cmd.Parameters.Add(":USER_NAME", OracleDbType.Varchar2, 50).Value   = obj.USER;
         cmd.Parameters.Add(":REMARKS", OracleDbType.Varchar2, 500).Value    = obj.REMARKS;
         cmd.Parameters.Add(":comp_status", OracleDbType.Varchar2, 50).Value = obj.SOURCE;
         cmd.Parameters.Add(":REPORT_ID", OracleDbType.Varchar2, 50).Value   = obj.REPORTID;
         int k = getProdgswsExecuteNonQuery(cmd);
         if (k > 0)
         {
             return("Success");
         }
         else
         {
             return("Failure");
         }
     }
     catch (Exception ex)
     {
         string mappath   = HttpContext.Current.Server.MapPath("SaveReOpenTicketExceptionLogs");
         Task   WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_ReportLog_Exception(mappath, "Error GSWS_REPORT_ISSUES :" + ex.Message.ToString()));
         throw ex;
     }
 }
Esempio n. 4
0
        public IHttpActionResult SaveReOpenTicket(dynamic data)
        {
            string value = token_gen.Authorize_aesdecrpty(data);

            try
            {
                //string value = JsonConvert.SerializeObject(data);
                string         mappath   = HttpContext.Current.Server.MapPath("SaveReOpenTicketLogs");
                Task           WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_Log(mappath, value));
                FeedBackReport rootobj   = JsonConvert.DeserializeObject <FeedBackReport>(value);
                return(Ok(Internalhel.SaveReOpenTicket_Helper(rootobj)));
            }
            catch (Exception ex)
            {
                CatchData.Status = "Failure";
                CatchData.Reason = "Error Occured While Save Data.";
                return(Ok(CatchData));
            }
        }
Esempio n. 5
0
 public String SaveFeedbackReport(FeedBackReport obj)
 {
     try
     {
         //obj.REPORTID = obj.SECRETRIATID + DateTime.Now.ToString("ddMMyyHHmmssfff");
         cmd             = new OracleCommand();
         cmd.CommandText = @"INSERT INTO GSWS_REPORT_ISSUES(SD_ID,HOD_ID,URL_ID,USER_NAME,REMARKS,IMAGE1_URL,IMAGE2_URL,IMAGE3_URL,DISTRICT_CODE,MANDAL_CODE,SEC_CODE,REPORT_ID,SUBJECT,SUBSUBJECT,SOURCE) values(:SD_ID,:HOD_ID,:URL_ID,:USER_NAME,:REMARKS,:IMAGE1_URL,:IMAGE2_URL,:IMAGE3_URL,:DISTRICT_CODE,:MANDAL_CODE,:SEC_CODE,:REPORT_ID,:SUBJECT,:SUBSUBJECT,:SOURCE)";
         cmd.Parameters.Add(":SD_ID", OracleDbType.Varchar2, 50).Value         = obj.DEPTID;
         cmd.Parameters.Add(":HOD_ID", OracleDbType.Varchar2, 50).Value        = obj.HODID;
         cmd.Parameters.Add(":URL_ID", OracleDbType.Varchar2, 500).Value       = obj.URL_ID;
         cmd.Parameters.Add(":USER_NAME", OracleDbType.Varchar2, 50).Value     = obj.USER;
         cmd.Parameters.Add(":REMARKS", OracleDbType.Varchar2, 500).Value      = obj.REMARKS;
         cmd.Parameters.Add(":IMAGE1_URL", OracleDbType.Varchar2, 500).Value   = obj.IMAGE1URL;
         cmd.Parameters.Add(":IMAGE2_URL", OracleDbType.Varchar2, 500).Value   = obj.IMAGE2URL;
         cmd.Parameters.Add(":IMAGE3_URL", OracleDbType.Varchar2, 500).Value   = obj.IMAGE3URL;
         cmd.Parameters.Add(":DISTRICT_CODE", OracleDbType.Varchar2, 50).Value = obj.DISTRICTID;
         cmd.Parameters.Add(":MANDAL_CODE", OracleDbType.Varchar2, 50).Value   = obj.MANDALID;
         cmd.Parameters.Add(":SEC_CODE", OracleDbType.Varchar2, 50).Value      = obj.SECRETRIATID;
         cmd.Parameters.Add(":REPORT_ID", OracleDbType.Varchar2, 50).Value     = obj.REPORTID;
         cmd.Parameters.Add(":SUBJECT", OracleDbType.Varchar2, 50).Value       = obj.SUBJECT;
         cmd.Parameters.Add(":SUBSUBJECT", OracleDbType.Varchar2, 50).Value    = obj.SUBSUBJECT;
         cmd.Parameters.Add(":SOURCE", OracleDbType.Varchar2, 50).Value        = obj.SOURCE;
         int k = getgswsExecuteNonQuery(cmd);
         if (k > 0)
         {
             return("Success");
         }
         else
         {
             return("Failure");
         }
     }
     catch (Exception ex)
     {
         string mappath   = HttpContext.Current.Server.MapPath("ExceptionLogs");
         Task   WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_ReportLog_Exception(mappath, "Error UpdateUserManualURL :" + ex.Message.ToString()));
         throw ex;
     }
 }