Ejemplo n.º 1
0
        public dynamic SavegetSpandanaGrievance(RootSpandaObject obj)
        {
            dynamic objdata = new ExpandoObject();

            try
            {
                string status = SaveSpandanaGrievance(obj);
                if (status == "Success")
                {
                    objdata.StatusCode = "100";
                    objdata.Message    = "Data Submitted Successfully";
                    return(objdata);
                }
                else
                {
                    objdata.StatusCode = "102";
                    objdata.Message    = "Data Not Submitted Please try Again";
                    return(objdata);
                }
            }
            catch (Exception ex)
            {
                objdata.StatusCode = "102";
                objdata.Message    = CommonSPHel.ThirdpartyMessage;
                return(objdata);
            }
        }
Ejemplo n.º 2
0
 public dynamic SaveSpandanaGrievance(RootSpandaObject objspandana)
 {
     try
     {
         cmd             = new OracleCommand();
         cmd.CommandType = CommandType.Text;
         cmd.CommandText = "Insert into gsws_spandana_grienvance (AADHAARNUMBER,HOUSEHOLDID,APPLICANTNAME,CAREOF,AGE,GENDER,PINCODE,MOBILE,INCOME,OCCUPATION,APPTYPEINFO,APPCREATOR,MKMDISTCODE,MKMMANDALCODE,MKMVILLAGECODE,PSSDISTCODE,PSSMANDALCODE,PSSVILLAGECODE,HODID,FORMID,PROBLEMDETAILS,HABITATION,PRESENTADDRESS,LOGINUSER)" +
                           " Values(:AADHAARNUMBER,:HOUSEHOLDID,:APPLICANTNAME,:CAREOF,:AGE,:GENDER,:PINCODE,:MOBILE,:INCOME,:OCCUPATION,:APPTYPEINFO,:APPCREATOR,:MKMDISTCODE,:MKMMANDALCODE,:MKMVILLAGECODE,:PSSDISTCODE,:PSSMANDALCODE,:PSSVILLAGECODE,:HODID,:FORMID,:PROBLEMDETAILS,:HABITATION,:PRESENTADDRESS,:LOGINUSER)";
         cmd.Parameters.Add(":AADHAARNUMBER", OracleDbType.Varchar2, 12).Value   = objspandana.AadhaarNumber;
         cmd.Parameters.Add(":HOUSEHOLDID", OracleDbType.Varchar2, 50).Value     = objspandana.HouseHoldId;
         cmd.Parameters.Add(":APPLICANTNAME", OracleDbType.Varchar2, 200).Value  = objspandana.ApplicantName;
         cmd.Parameters.Add(":CAREOF", OracleDbType.Varchar2, 200).Value         = objspandana.CareOf;
         cmd.Parameters.Add(":AGE", OracleDbType.Varchar2, 50).Value             = objspandana.Age;
         cmd.Parameters.Add(":GENDER", OracleDbType.Varchar2, 20).Value          = objspandana.Gender;
         cmd.Parameters.Add(":PINCODE", OracleDbType.Varchar2, 12).Value         = objspandana.PinCode;
         cmd.Parameters.Add(":MOBILE", OracleDbType.Varchar2, 50).Value          = objspandana.Mobile;
         cmd.Parameters.Add(":INCOME", OracleDbType.Varchar2, 50).Value          = objspandana.Income;
         cmd.Parameters.Add(":OCCUPATION", OracleDbType.Varchar2, 200).Value     = objspandana.Occupation;
         cmd.Parameters.Add(":APPTYPEINFO", OracleDbType.Varchar2, 12).Value     = objspandana.AppTypeInfo;
         cmd.Parameters.Add(":APPCREATOR ", OracleDbType.Varchar2, 50).Value     = objspandana.AppCreator;
         cmd.Parameters.Add(":MKMDISTCODE", OracleDbType.Varchar2, 200).Value    = objspandana.MkmDistCode;
         cmd.Parameters.Add(":MKMMANDALCODE", OracleDbType.Varchar2, 12).Value   = objspandana.MkmMandalCode;
         cmd.Parameters.Add(":MKMVILLAGECODE ", OracleDbType.Varchar2, 50).Value = objspandana.MkmVillageCode;
         cmd.Parameters.Add(":PSSDISTCODE", OracleDbType.Varchar2, 200).Value    = objspandana.PssDistCode;
         cmd.Parameters.Add(":PSSMANDALCODE", OracleDbType.Varchar2, 12).Value   = objspandana.PssMandalCode;
         cmd.Parameters.Add(":PSSVILLAGECODE", OracleDbType.Varchar2, 50).Value  = objspandana.PssVillageCode;
         cmd.Parameters.Add(":HODID", OracleDbType.Varchar2, 200).Value          = objspandana.HodId;
         cmd.Parameters.Add(":FORMID", OracleDbType.Varchar2, 12).Value          = objspandana.FormID;
         cmd.Parameters.Add(":PROBLEMDETAILS", OracleDbType.Varchar2, 250).Value = objspandana.ProblemDetails;
         cmd.Parameters.Add(":HABITATION", OracleDbType.Varchar2, 200).Value     = objspandana.Habitation;
         cmd.Parameters.Add(":PRESENTADDRESS", OracleDbType.Varchar2, 200).Value = objspandana.PresentAddress;
         cmd.Parameters.Add(":LOGINUSER", OracleDbType.Varchar2, 200).Value      = objspandana.Loginuser;
         int k = comhel.getgswsExecuteNonQuery(cmd);
         if (k > 0)
         {
             return("Success");
         }
         else
         {
             return("Failure");
         }
     }
     catch (Exception ex)
     {
         string mappath   = HttpContext.Current.Server.MapPath("SapandaSubmitExceptionLogs");
         Task   WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_Log_Exception(mappath, ex.Message.ToString()));
         throw ex;
     }
 }
Ejemplo n.º 3
0
        public IHttpActionResult SapandaSubmit(dynamic data)
        {
            string value = token_gen.Authorize_aesdecrpty(data);

            try
            {
                string           mappath   = HttpContext.Current.Server.MapPath("SapandaSubmitLogs");
                Task             WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_Log(mappath, value));
                RootSpandaObject root      = JsonConvert.DeserializeObject <RootSpandaObject>(value);
                //CatchData.StatusCode = "200";
                //CatchData.Message = "Data Submitted Successfully";
                return(Ok(Revenuehel.SavegetSpandanaGrievance(root)));
            }
            catch (Exception ex)
            {
                CatchData.Status = "Failure";
                CatchData.Reason = CommonSPHel.ThirdpartyMessage;
                return(Ok(CatchData));
            }
        }