public void SaveTransaction(TaskCard taskCard, int id) { try { sipCancellation = new FinancialPlanner.Common.JSONSerialization().DeserializeFromString <SIPCancellation>(taskCard.TaskTransactionType.ToString()); sipCancellation.TaskId = id; DataBase.DBService.ExecuteCommandString(string.Format(INSERT_SIPCANCELLATION, sipCancellation.TaskId, sipCancellation.Cid, sipCancellation.MemberName, sipCancellation.Amc, sipCancellation.FolioNumber, sipCancellation.SchemeId, sipCancellation.Options, sipCancellation.Amount, sipCancellation.SipStartDate.ToString("yyyy-MM-dd hh:mm:ss"), sipCancellation.SipEndDate.ToString("yyyy-MM-dd hh:mm:ss"), sipCancellation.SipDate, sipCancellation.BankId, sipCancellation.AccountNo, sipCancellation.ModeOfExecution, sipCancellation.Remark, sipCancellation.Arn), true); } catch (Exception ex) { StackTrace st = new StackTrace(); StackFrame sf = st.GetFrame(0); MethodBase currentMethodName = sf.GetMethod(); LogDebug(currentMethodName.Name, ex); throw ex; } }
public void UpdateTransaction(TaskCard taskCard) { sipCancellation = new FinancialPlanner.Common.JSONSerialization().DeserializeFromString <SIPCancellation>(taskCard.TaskTransactionType.ToString()); DataBase.DBService.ExecuteCommandString(string.Format(UPDATE_SIPCANCELLATION, sipCancellation.Cid, sipCancellation.MemberName, sipCancellation.Amc, sipCancellation.FolioNumber, sipCancellation.SchemeId, sipCancellation.Options, sipCancellation.Amount, sipCancellation.SipStartDate, sipCancellation.SipEndDate, sipCancellation.SipDate, sipCancellation.BankId, sipCancellation.AccountNo, sipCancellation.ModeOfExecution, sipCancellation.Remark, sipCancellation.Arn, taskCard.Id), true); }
private SIPCancellation converToSIPCancellation(DataRow dr) { SIPCancellation sipCancellation = new SIPCancellation(); sipCancellation.Id = dr.Field <int>("ID"); sipCancellation.TaskId = dr.Field <int>("TaskId"); sipCancellation.Cid = dr.Field <int>("CID"); sipCancellation.MemberName = dr.Field <string>("MemberName"); sipCancellation.Amc = dr.Field <int>("AMC"); sipCancellation.FolioNumber = dr.Field <string>("FolioNumber"); sipCancellation.SchemeId = dr.Field <int>("SchemeId"); sipCancellation.Options = dr.Field <string>("Option"); sipCancellation.Amount = dr.Field <long>("Amount"); sipCancellation.SipStartDate = dr.Field <DateTime>("SipStartDate"); sipCancellation.SipEndDate = dr.Field <DateTime>("SipEndDate"); sipCancellation.SipDate = dr.Field <int>("SipDate"); sipCancellation.BankId = int.Parse(dr["BankName"].ToString()); sipCancellation.AccountNo = dr.Field <String>("AccountNo"); sipCancellation.ModeOfExecution = dr.Field <string>("ModeOfExecution"); sipCancellation.Remark = dr.Field <string>("Remark"); sipCancellation.Arn = dr.Field <int>("ARN"); return(sipCancellation); }
public object GetTransaction(int id) { try { Logger.LogInfo("Get: SIP cancellation transaction process start"); sipCancellation = new SIPCancellation(); DataTable dtAppConfig = DataBase.DBService.ExecuteCommand(string.Format(SELECT_BY_ID, id)); foreach (DataRow dr in dtAppConfig.Rows) { sipCancellation = converToSIPCancellation(dr); } Logger.LogInfo("Get: SIP cancellation transaction process completed."); return(sipCancellation); } catch (Exception ex) { StackTrace st = new StackTrace(); StackFrame sf = st.GetFrame(0); MethodBase currentMethodName = sf.GetMethod(); LogDebug(currentMethodName.Name, ex); return(null); } }