Пример #1
0
        public CompDetailByFarmer GetFarmerComplaint(int OrderID, int FarmerId)
        {
            DataSet ds = _Apdal.GetFarmerComplaint(OrderID, FarmerId);

            CompDetailByFarmer Isd = new CompDetailByFarmer();

            if (ds != null && ds.Tables[0] != null)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    List <ComplainModel> _IL = new List <ComplainModel>();
                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        ComplainModel ILF = new ComplainModel();
                        ILF.ComplaintID = Convert.ToInt32(ds.Tables[0].Rows[i]["ComplaintID"].ToString());
                        ILF.Query       = ds.Tables[0].Rows[i]["Query"].ToString();
                        ILF.CreatedDate = ds.Tables[0].Rows[i]["CreatedDate"].ToString();
                        ILF.IssueType   = ds.Tables[0].Rows[i]["IssueType"].ToString();
                        ILF.IssueDetail = ds.Tables[0].Rows[i]["IssueDetail"].ToString();
                        ILF.ProductName = ds.Tables[0].Rows[i]["ProductName"].ToString();
                        ILF.CreatedBy   = ds.Tables[0].Rows[i]["CreatorName"].ToString();


                        _IL.Add(ILF);
                    }
                    Isd.CompList = _IL;
                }
            }
            return(Isd);
        }
Пример #2
0
        public IActionResult Index()
        {
            ComplainModel model = new ComplainModel()
            {
                Politician = DataBaseHelper.GetPoliticans(0, 0)
            };

            return(View(model));
        }