public ResponseModel getstoreDashboardListClaim([FromBody] StoreDashboardClaimModel ClaimSearchModel) { List <StoreDashboardClaimResponseModel> ClaimSearchResponse = new List <StoreDashboardClaimResponseModel>(); ResponseModel objResponseModel = new ResponseModel(); int StatusCode = 0; string statusMessage = ""; try { string token = Convert.ToString(Request.Headers["X-Authorized-Token"]); Authenticate authenticate = new Authenticate(); authenticate = SecurityService.GetAuthenticateDataFromToken(_radisCacheServerAddress, SecurityService.DecryptStringAES(token)); ClaimSearchModel.tenantID = authenticate.TenantId; StoreDashboardCaller dashBoardcaller = new StoreDashboardCaller(); ClaimSearchResponse = dashBoardcaller.getStoreDashboardClaimList(new StoreDashboardService(_connectioSting), ClaimSearchModel); StatusCode = ClaimSearchResponse.Count > 0 ? (int)EnumMaster.StatusCode.Success : (int)EnumMaster.StatusCode.RecordNotFound; statusMessage = CommonFunction.GetEnumDescription((EnumMaster.StatusCode)StatusCode); objResponseModel.Status = true; objResponseModel.StatusCode = StatusCode; objResponseModel.Message = statusMessage; objResponseModel.ResponseData = ClaimSearchResponse; } catch (Exception) { throw; } return(objResponseModel); }
/// <summary> ///get store Dashborad Details For Claim /// </summary> public List <StoreDashboardClaimResponseModel> getStoreDashboardClaimList(IStoreDashboard DashBoard, StoreDashboardClaimModel ClaimSearchModel) { _dashboard = DashBoard; return(_dashboard.GetClaimDataForStoreDashboard(ClaimSearchModel)); }
/// <summary> ///get store Dashborad Details For Claim /// </summary> public List <StoreDashboardClaimResponseModel> getStoreDashboardClaimList(IStoreDashboard dashboard, StoreDashboardClaimModel modelname) { _dashboard = dashboard; return(_dashboard.GetClaimDataForStoreDashboard(modelname)); }
/// <summary> /// Get task Data For store dashboard for claim /// </summary> /// <param name="TenantID"></param> /// <returns></returns> public List <StoreDashboardClaimResponseModel> GetClaimDataForStoreDashboard(StoreDashboardClaimModel model) { DataSet ds = new DataSet(); MySqlCommand cmd = new MySqlCommand(); List <StoreDashboardClaimResponseModel> ClaimSearchResponse = new List <StoreDashboardClaimResponseModel>(); try { conn.Open(); cmd.Connection = conn; MySqlCommand cmd1 = new MySqlCommand("sp_getStoreDashboardClaimData", conn); cmd1.CommandType = CommandType.StoredProcedure; cmd1.Parameters.AddWithValue("@objclaimID", model.claimID == null ? 0 : model.claimID); cmd1.Parameters.AddWithValue("@objticketID", model.ticketID == null ? 0 : model.ticketID); cmd1.Parameters.AddWithValue("@objclaimissueType", model.claimissueType == null ? 0 : model.claimissueType); cmd1.Parameters.AddWithValue("@objticketMapped", model.ticketMapped == null ? 0 : model.ticketMapped); cmd1.Parameters.AddWithValue("@objclaimsubcat", model.claimsubcat == null ? 0 : model.claimsubcat); cmd1.Parameters.AddWithValue("@objassignTo", model.assignTo == null ? 0 : model.assignTo); cmd1.Parameters.AddWithValue("@objclaimcat", model.claimcat == null ? 0 : model.claimcat); cmd1.Parameters.AddWithValue("@objclaimraise", string.IsNullOrEmpty(model.claimraiseddate) ? "" : model.claimraiseddate); cmd1.Parameters.AddWithValue("@objtaskID", model.taskID == null ? 0 : model.taskID); cmd1.Parameters.AddWithValue("@objclaimstatus", model.claimstatus == null ? 0 : model.claimstatus); cmd1.Parameters.AddWithValue("@objtaskmapped", model.taskmapped == null ? 0 : model.taskmapped); cmd1.Parameters.AddWithValue("@objraisedby", model.raisedby == null ? 0 : model.raisedby); cmd1.Parameters.AddWithValue("@objtenantID", model.tenantID); cmd1.Parameters.AddWithValue("@objbrandIDs", string.IsNullOrEmpty(model.BrandIDs) ? "" : model.BrandIDs.TrimEnd(',')); cmd1.Parameters.AddWithValue("@objAgentIds", string.IsNullOrEmpty(model.AgentIds) ? "" : model.AgentIds.TrimEnd(',')); cmd1.Parameters.AddWithValue("@objFromDate", string.IsNullOrEmpty(model.FromDate) ? "" : model.FromDate); cmd1.Parameters.AddWithValue("@objToDate", string.IsNullOrEmpty(model.ToDate) ? "" : model.ToDate); MySqlDataAdapter da = new MySqlDataAdapter(); da.SelectCommand = cmd1; da.Fill(ds); if (ds != null && ds.Tables[0] != null) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { StoreDashboardClaimResponseModel StoreDashboard = new StoreDashboardClaimResponseModel(); StoreDashboard.ClaimID = ds.Tables[0].Rows[i]["ClaimID"] == DBNull.Value ? 0 : Convert.ToInt32(ds.Tables[0].Rows[i]["ClaimID"]); StoreDashboard.ClaimStatusId = ds.Tables[0].Rows[i]["StatusID"] == DBNull.Value ? 0 : Convert.ToInt32(ds.Tables[0].Rows[i]["StatusID"]); StoreDashboard.ClaimStatus = StoreDashboard.ClaimStatusId.Equals(0) ? string.Empty : Convert.ToString((EnumMaster.ClaimStatus)StoreDashboard.ClaimStatusId); StoreDashboard.BrandID = ds.Tables[0].Rows[i]["BrandID"] == DBNull.Value ? 0 : Convert.ToInt32(ds.Tables[0].Rows[i]["BrandID"]); StoreDashboard.BrandName = ds.Tables[0].Rows[i]["BrandName"] == DBNull.Value ? string.Empty : Convert.ToString(ds.Tables[0].Rows[i]["BrandName"]); StoreDashboard.CategoryID = ds.Tables[0].Rows[i]["CategoryID"] == DBNull.Value ? 0 : Convert.ToInt32(ds.Tables[0].Rows[i]["CategoryID"]); StoreDashboard.CategoryName = ds.Tables[0].Rows[i]["CategoryName"] == DBNull.Value ? string.Empty : Convert.ToString(ds.Tables[0].Rows[i]["CategoryName"]); StoreDashboard.SubCategoryID = ds.Tables[0].Rows[i]["SubCategoryID"] == DBNull.Value ? 0 : Convert.ToInt32(ds.Tables[0].Rows[i]["SubCategoryID"]); StoreDashboard.SubCategoryName = ds.Tables[0].Rows[i]["SubCategoryName"] == DBNull.Value ? string.Empty : Convert.ToString(ds.Tables[0].Rows[i]["SubCategoryName"]); StoreDashboard.IssueTypeID = ds.Tables[0].Rows[i]["IssueTypeID"] == DBNull.Value ? 0 : Convert.ToInt32(ds.Tables[0].Rows[i]["IssueTypeID"]); StoreDashboard.IssueTypeName = ds.Tables[0].Rows[i]["IssueTypeName"] == DBNull.Value ? string.Empty : Convert.ToString(ds.Tables[0].Rows[i]["IssueTypeName"]); StoreDashboard.CreatedBy = ds.Tables[0].Rows[i]["CreatedBy"] == DBNull.Value ? 0 : Convert.ToInt32(ds.Tables[0].Rows[i]["CreatedBy"]); StoreDashboard.CreatedByName = ds.Tables[0].Rows[i]["CreatedByName"] == DBNull.Value ? string.Empty : Convert.ToString(ds.Tables[0].Rows[i]["CreatedByName"]); StoreDashboard.AssignedId = ds.Tables[0].Rows[i]["AssignedID"] == DBNull.Value ? 0 : Convert.ToInt32(ds.Tables[0].Rows[i]["AssignedID"]); StoreDashboard.AssignTo = ds.Tables[0].Rows[i]["AssignedToName"] == DBNull.Value ? string.Empty : Convert.ToString(ds.Tables[0].Rows[i]["AssignedToName"]); StoreDashboard.ClaimRaisedByID = ds.Tables[0].Rows[i]["CustomerID"] == DBNull.Value ? 0 : Convert.ToInt32(ds.Tables[0].Rows[i]["CustomerID"]); StoreDashboard.ClaimRaisedBy = ds.Tables[0].Rows[i]["Raisedby"] == DBNull.Value ? string.Empty : Convert.ToString(ds.Tables[0].Rows[i]["Raisedby"]); StoreDashboard.CreationOn = ds.Tables[0].Rows[i]["CreationOn"] == DBNull.Value ? string.Empty : Convert.ToString(ds.Tables[0].Rows[i]["CreationOn"]); ClaimSearchResponse.Add(StoreDashboard); } } } catch (Exception ex) { throw ex; } finally { if (conn != null) { conn.Close(); } } return(ClaimSearchResponse); }