public IHttpActionResult GetOutwardChechStatusSummary() { var query = ConfigurationManager.AppSettings["OutwardCheckStatusLoc"]; OutwardCheckService outCheck = new OutwardCheckService(); var result = outCheck.GetOutwardCheckSummary(query); return(Ok(result)); }
public IHttpActionResult LoanExportSummary(String idx) { var result = ""; OutwardCheckService outCheck = new OutwardCheckService(); result = outCheck.ExportToExcel(idx); return(Ok(result)); }
public String ReturnBypassUpdateAmountNoKey() { OutwardCheckService outSvcGetDate = new OutwardCheckService(); string sqlUpdateCommand = @"UPDATE TBL_OUTWARD SET BATCH_ACCOUNT_NUMBER_FIN = '0000000000000', BATCH_ACCOUNT_NO_V_FLAG = '1' WHERE TRANSACTION_DATE = '" + outSvcGetDate.GetDateCurrentDate() + "' AND VALIDATION_STATUS = '3' AND CHK_FLAG = '3' AND BATCH_ACCOUNT_NO_V_FLAG IS NULL AND FLOW_TYPE = 'OCLGBS'"; int numberOfRecords = 0; using (var connection = new SqlConnection(ConfigurationManager.ConnectionStrings["EXPRESS_SBC_CONN"].ConnectionString)) { SqlCommand cmd = new SqlCommand(sqlUpdateCommand, connection); connection.Open(); numberOfRecords = cmd.ExecuteNonQuery(); } return(" " + numberOfRecords + " row/s Updated"); }
public IHttpActionResult GetDetailsSummary(String idx, String fps, String offSet, String npLength) { var result = ""; if (idx.Equals("6")) // 11/11/2019 sprint 4 export to excel { OutwardCheckService outCheck = new OutwardCheckService(); result = outCheck.ExportToExcel(idx); } else { OutwardCheckService outCheck = new OutwardCheckService(); result = outCheck.GetDetailsSummary(idx, fps, offSet, npLength); } return(Ok(result)); }
public String ReturnBypassSelectTotalAmountNoKey() { string returnCount = ""; OutwardCheckService outSvcGetDate = new OutwardCheckService(); string sqlCommand = @"SELECT count(*) as CNT FROM TBL_OUTWARD WHERE TRANSACTION_DATE = '" + outSvcGetDate.GetDateCurrentDate() + "' AND VALIDATION_STATUS = '3' AND CHK_FLAG = '3' AND BATCH_ACCOUNT_NO_V_FLAG IS NULL AND FLOW_TYPE = 'OCLGBS'"; using (var connection = new SqlConnection(ConfigurationManager.ConnectionStrings["EXPRESS_SBC_CONN"].ConnectionString)) { SqlCommand cmd = new SqlCommand(sqlCommand, connection); connection.Open(); SqlDataReader reader = cmd.ExecuteReader(); while (reader.Read()) { returnCount = reader["CNT"].ToString(); } } return(returnCount); }