public OrderWiseProductViewModel OrderWiseProduct(string apiKey, int orderid)
        {
            OrderWiseProductViewModel FSCOrderList = new OrderWiseProductViewModel();

            if (apiKey == ConfigurationManager.AppSettings["reasonkey"])
            {
                try
                {
                    FSCOrderList = _agentbal.OrderWiseProduct(orderid);
                }
                catch (Exception ex)
                {
                    LogBal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0);
                }
            }
            else
            {
            }
            return(FSCOrderList);
        }
        public OrderWiseProductViewModel OrderWiseProduct(int orderid)
        {
            DataSet ds = _Apdal.OrderWiseProduct(orderid);

            OrderWiseProductViewModel Isd = new OrderWiseProductViewModel();

            if (ds != null && ds.Tables[0] != null)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    List <OrderWiseProduct> _IL = new List <OrderWiseProduct>();
                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        OrderWiseProduct ILF = new OrderWiseProduct();
                        ILF.PackageId   = Convert.ToInt32(ds.Tables[0].Rows[i]["PackageId"].ToString());
                        ILF.PackageName = ds.Tables[0].Rows[i]["ProductName"].ToString() + "(" + ds.Tables[0].Rows[i]["CategoryName"].ToString() + "," + ds.Tables[0].Rows[i]["BrandName"].ToString() + ")";
                        _IL.Add(ILF);
                    }
                    Isd._OrderWiseProductList = _IL;
                }
            }
            return(Isd);
        }