public Response GetScheduled_Payment( int TRANSACTION_TYPE, string FROM_YEAR_MONTH, string TO_YEAR_MONTH, string FROM_STATUS_PLAN_DEPOSIT_YYMM, string TO_STATUS_PLAN_DEPOSIT_YYMM, string FROM_STATUS_ACTUAL_DEPOSIT_DATE, string TO_STATUS_ACTUAL_DEPOSIT_DATE, string DEPOSIT_RULE, string WITH_OR_WITHOUT_PAYMENT, string BILL_SUPPLIER_NAME) { try { INVOICE_INFO oINV = new INVOICE_INFO(Properties.Settings.Default.MyConnection); string strMessage = ""; string from_yearMonth = Utility_Component.GetYearMonth(FROM_YEAR_MONTH, true); string to_yearMonth = Utility_Component.GetYearMonth(TO_YEAR_MONTH, false); string from_statusPlanYYMM = Utility_Component.GetYearMonth(FROM_STATUS_PLAN_DEPOSIT_YYMM, true); string to_statusPlanYYMM = Utility_Component.GetYearMonth(TO_STATUS_PLAN_DEPOSIT_YYMM, false); string from_statusPlanDate = Utility_Component.GetFullDate(FROM_STATUS_ACTUAL_DEPOSIT_DATE); string to_statusPlanDate = Utility_Component.GetFullDate(TO_STATUS_ACTUAL_DEPOSIT_DATE); DataTable dt = oINV.getDataForScheduled_Payment( TRANSACTION_TYPE, from_yearMonth, to_yearMonth, from_statusPlanYYMM, to_statusPlanYYMM, from_statusPlanDate, to_statusPlanDate, DEPOSIT_RULE, WITH_OR_WITHOUT_PAYMENT, BILL_SUPPLIER_NAME, out strMessage ); response.Data = Utility.Utility_Component.DtToJSon(dt, "Scheduled Payment"); if (dt.Rows.Count > 0) { response.Status = 1; response.Message = "Success"; } else { if (strMessage == "") { response.Status = 1; response.Message = "There has no data to display."; } else { response.Status = 0; response.Message = strMessage; } } return(response); } catch (Exception ex) { response.Status = 0; response.Message = ex.Message + "\n" + ex.StackTrace; return(response); } }