public void Add(SIPTypeInvestmentRecomendation SIPInvestmentRecomendation) { try { //string clientName = DataBase.DBService.ExecuteCommandScalar(string.Format(GET_CLIENT_NAME_QUERY, SIPInvestmentRecomendation.Pid)); DataBase.DBService.ExecuteCommand(string.Format(INSERT_LUMSUM, SIPInvestmentRecomendation.Pid, SIPInvestmentRecomendation.SchemeId, SIPInvestmentRecomendation.Amount, SIPInvestmentRecomendation.ChequeInFavourOff, SIPInvestmentRecomendation.FirstHolder, SIPInvestmentRecomendation.SecondHolder, SIPInvestmentRecomendation.CreatedOn.ToString("yyyy-MM-dd hh:mm:ss"), SIPInvestmentRecomendation.CreatedBy, SIPInvestmentRecomendation.UpdatedOn.ToString("yyyy-MM-dd hh:mm:ss"), SIPInvestmentRecomendation.UpdatedBy)); Activity.ActivitiesService.Add(ActivityType.CreateInvestmentRecommendation, EntryStatus.Success, Source.Server, SIPInvestmentRecomendation.UpdatedByUserName, SIPInvestmentRecomendation.SchemeName, SIPInvestmentRecomendation.MachineName); } catch (Exception ex) { StackTrace st = new StackTrace(); StackFrame sf = st.GetFrame(0); MethodBase currentMethodName = sf.GetMethod(); LogDebug(currentMethodName.Name, ex); throw ex; } }
private SIPTypeInvestmentRecomendation convertToSIPInvestmentRecomendationObject(DataRow dr) { SIPTypeInvestmentRecomendation SIPInvestmentRecomendation = new SIPTypeInvestmentRecomendation(); SIPInvestmentRecomendation.Pid = dr.Field <int>("PId"); SIPInvestmentRecomendation.SchemeId = dr.Field <int>("SchemeId"); SIPInvestmentRecomendation.SchemeName = dr.Field <string>("SchemeName"); SIPInvestmentRecomendation.Amount = double.Parse(dr["Amount"].ToString()); SIPInvestmentRecomendation.Category = dr.Field <string>("Category"); SIPInvestmentRecomendation.ChequeInFavourOff = dr.Field <string>("ChequeInfavourOff"); SIPInvestmentRecomendation.FirstHolder = dr.Field <string>("FirstHolder"); SIPInvestmentRecomendation.SecondHolder = dr.Field <string>("SecondHolder"); SIPInvestmentRecomendation.Type = dr.Field <string>("Type"); return(SIPInvestmentRecomendation); }
public Result Delete(SIPTypeInvestmentRecomendation SIPInvestmentRecomendation) { var result = new Result(); try { SIPTypeInvestmentRecomendationService SIPTypeInvestmentRecomendation = new SIPTypeInvestmentRecomendationService(); SIPTypeInvestmentRecomendation.Delete(SIPInvestmentRecomendation); result.IsSuccess = true; } catch (Exception exception) { result.IsSuccess = false; result.ExceptionInfo = exception; } return(result); }
public void Delete(SIPTypeInvestmentRecomendation SIPInvestmentRecomendation) { try { string clientName = DataBase.DBService.ExecuteCommandScalar(string.Format(GET_CLIENT_NAME_QUERY, SIPInvestmentRecomendation.Pid)); DataBase.DBService.ExecuteCommand(string.Format(DELETE_QUERY, SIPInvestmentRecomendation.Pid, SIPInvestmentRecomendation.SchemeId, SIPInvestmentRecomendation.Amount)); Activity.ActivitiesService.Add(ActivityType.DeleteInvestmentRecommendation, EntryStatus.Success, Source.Server, SIPInvestmentRecomendation.UpdatedByUserName, SIPInvestmentRecomendation.SchemeName, SIPInvestmentRecomendation.MachineName); } catch (Exception ex) { StackTrace st = new StackTrace(); StackFrame sf = st.GetFrame(0); MethodBase currentMethodName = sf.GetMethod(); LogDebug(currentMethodName.Name, ex); throw ex; } }
public IList <SIPTypeInvestmentRecomendation> GetAll(int plannerId) { IList <SIPTypeInvestmentRecomendation> SIPInvestmentRecomendations = new List <SIPTypeInvestmentRecomendation>(); try { Logger.LogInfo("Get: Lumsum investment process start"); DataTable dtAppConfig = DataBase.DBService.ExecuteCommand(string.Format(SELECT_ALL, plannerId)); foreach (DataRow dr in dtAppConfig.Rows) { SIPTypeInvestmentRecomendation SIPInvestmentRecomendation = convertToSIPInvestmentRecomendationObject(dr); SIPInvestmentRecomendations.Add(SIPInvestmentRecomendation); } Logger.LogInfo("Get: Lumsum investment process completed."); } catch (Exception ex) { StackTrace st = new StackTrace(); StackFrame sf = st.GetFrame(0); MethodBase currentMethodName = sf.GetMethod(); LogDebug(currentMethodName.Name, ex); } return(SIPInvestmentRecomendations); }