public ActionResult NotificationStakeholderList(Search_StakeholderMailSentReceive obj) { if (Convert.ToString(Session["UserId"]).Trim().Length > 0) { if (obj.PageIndex == 0) { obj.PageIndex = 1; } if (obj.PageSize == 0) { obj.PageSize = 10; } if (obj.FromDate == null) { obj.FromDate = ""; } if (obj.ToDate == null) { obj.ToDate = ""; } if (obj.Status == null) { obj.Status = "0"; } ViewBag.FromDate = obj.FromDate; ViewBag.ToDate = obj.ToDate; ViewBag.Status = obj.Status; NotificationListBusinessService objNBS = new NotificationListBusinessService(); return(View(objNBS.GetStakeholderMailSentResponse(obj))); } else { return(RedirectToAction("Index", "Login")); } }
public IHttpActionResult GetStakeholderMailSentResponse(Search_StakeholderMailSentReceive obj) { if (obj.PageIndex == 0) { obj.PageIndex = 1; } if (obj.PageSize == 0) { obj.PageSize = 10; } NotificationListBusinessService objBS = new NotificationListBusinessService(); return(Ok(objBS.GetStakeholderMailSentResponse(obj))); }
public DataSet GetStakeholderMailSentResponse(Search_StakeholderMailSentReceive obj) { using (SqlCommand sqlCommand = new SqlCommand()) { sqlCommand.CommandType = CommandType.StoredProcedure; sqlCommand.CommandText = Procedures.GetStakholdersMailSentResponseList; sqlCommand.Parameters.AddWithValue("@PageIndex", obj.PageIndex); sqlCommand.Parameters.AddWithValue("@PageSize", obj.PageSize); sqlCommand.Parameters.AddWithValue("@FromDate", obj.FromDate); sqlCommand.Parameters.AddWithValue("@ToDate", obj.ToDate); sqlCommand.Parameters.AddWithValue("@Status", obj.Status); return(DAL.GetDataSet(ConfigurationHelper.connectionString, sqlCommand)); } }
public StakeholderMailSentReceive GetStakeholderMailSentResponse(Search_StakeholderMailSentReceive obj) { StakeholderMailSentReceive objStakeholderMailSentReceive = new StakeholderMailSentReceive(); NotificationListDataManager objDM = new NotificationListDataManager(); DataSet ds = objDM.GetStakeholderMailSentResponse(obj); if (ds != null && ds.Tables.Count > 0) { int tblIndx = -1; tblIndx++; if (ds.Tables.Count > tblIndx && ds.Tables[tblIndx] != null && ds.Tables[tblIndx].Rows.Count > 0) { List <RelatedStakeHolders> ItemsList = new List <RelatedStakeHolders>(); foreach (DataRow dr in ds.Tables[tblIndx].Rows) { RelatedStakeHolders objItems = new RelatedStakeHolders(); objItems.StakeHolderId = Convert.ToInt32(dr["StakeHolderId"]); objItems.FullName = Convert.ToString(dr["FullName"]); objItems.OrgName = Convert.ToString(dr["OrgName"]); objItems.Designation = Convert.ToString(dr["Designation"]); objItems.MailCount = Convert.ToInt32(dr["MailCount"]); objItems.ResponseCount = Convert.ToInt32(dr["ResponseCount"]); objItems.HSCodes = Convert.ToString(dr["HSCodes"]); ItemsList.Add(objItems); } objStakeholderMailSentReceive.objRelatedStakeHolders = ItemsList; } #region "Paging" tblIndx++; if (ds.Tables.Count > tblIndx && ds.Tables[tblIndx] != null && ds.Tables[tblIndx].Rows.Count > 0) { objStakeholderMailSentReceive.TotalCount = Convert.ToString(ds.Tables[tblIndx].Rows[0]["TotalCount"]); objStakeholderMailSentReceive.Pager = new Pager(Convert.ToInt32(objStakeholderMailSentReceive.TotalCount), Convert.ToInt16(obj.PageIndex)); } #endregion } return(objStakeholderMailSentReceive); }