Exemplo n.º 1
0
        public dynamic LoadBankDetails(JobCardBankModel ObjLGD)
        {
            dynamic      obj   = new ExpandoObject();
            PRRDSPHelper spobj = new PRRDSPHelper();

            try
            {
                DataTable dt = spobj.GetBankDetails_SP(ObjLGD);
                if (dt != null && dt.Rows.Count > 0)
                {
                    obj.Status      = 100;
                    obj.Reason      = "";
                    obj.BankDetails = dt;
                }
                else
                {
                    obj.Status = 101;
                    obj.Reason = "No Data Found";
                }
            }
            catch (Exception ex)
            {
                string mappath   = HttpContext.Current.Server.MapPath("JobcardHelperExceptions");
                Task   WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_Log_Exception(mappath, "Error Getting LoadBankDetails:" + ex.ToString()));
                obj.Status = 102;
                obj.Reason = ex.Message.ToString() + "Error Occued While Loading Data";
                return(obj);
            }
            return(obj);
        }
Exemplo n.º 2
0
 public DataTable GetBankDetails_SP(JobCardBankModel ObjLGD)
 {
     try
     {
         cmd = new OracleCommand();
         cmd.InitialLONGFetchSize = 1000;
         cmd.CommandType          = CommandType.StoredProcedure;
         cmd.CommandText          = "PR_GET_BANK_IFSC_CODES";
         cmd.Parameters.Add("P_TYPE", OracleDbType.Varchar2, 10).Value        = ObjLGD.TYPE;
         cmd.Parameters.Add("P_BANK_NAME", OracleDbType.Varchar2, 50).Value   = ObjLGD.BankName;
         cmd.Parameters.Add("P_BRANCH_NAME", OracleDbType.Varchar2, 50).Value = ObjLGD.BranchName;
         cmd.Parameters.Add("P_IFSC_CODE", OracleDbType.Varchar2, 50).Value   = ObjLGD.IFSCCode;
         cmd.Parameters.Add("P_CUR", OracleDbType.RefCursor).Direction        = ParameterDirection.Output;
         DataTable dtLogin = GetgswsDataAdapter(cmd);
         if (dtLogin != null)
         {
             return(dtLogin);
         }
         else
         {
             return(null);
         }
     }
     catch (Exception ex)
     {
         string mappath   = HttpContext.Current.Server.MapPath("JobCardExceptions");
         Task   WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_Log_Exception(mappath, "Error GetBankDetails_SP" + ex.Message.ToString()));
         throw ex;
     }
 }
Exemplo n.º 3
0
        public dynamic GetJobCardBankMaster(dynamic data)
        {
            string           jsondata  = token_gen.Authorize_aesdecrpty(data);
            JobCardBankModel val       = JsonConvert.DeserializeObject <JobCardBankModel>(jsondata);
            LogModel         ologmodel = new LogModel();

            ologmodel.UserId   = val.UserId;
            ologmodel.SacId    = val.SacId;
            ologmodel.DesignId = val.DesignId;
            ologmodel.DeptId   = string.Empty;
            ologmodel.TranId   = val.TranId;
            //olog.WriteLogParameters(ologmodel);
            try
            {
                JobCardHelper hlpval = new JobCardHelper();
                //_log.Info("In the RevenueController => GetRevenueMaster: " + jsondata.ToString());
                return(Ok(hlpval.LoadBankDetails(val)));
                //	return "SuccessEncryptDataModel
            }
            catch (Exception ex)
            {
                string mappath   = HttpContext.Current.Server.MapPath("JobcardControllrExceptions");
                Task   WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_Log_Exception(mappath, "getting error GetJobCardBankMaster :" + ex.Message.ToString()));
                CatchData.Status = "Failure";
                CatchData.Reason = CommonSPHel.ThirdpartyMessage;
                return(Ok(CatchData));
            }
        }