Beispiel #1
0
        public ActionResult ListViewCustomization()
        {
            // Pass the feature id as zero in the below constructor
            MapListViewImple             objMapListViewImple = new MapListViewImple(0);
            List <ListViewCustomization> objListViewsInfo    = objMapListViewImple.GetListViewsCustomizationInfo();
            string x = JsonConvert.SerializeObject(objListViewsInfo[0]);

            return(View(objListViewsInfo));
        }
Beispiel #2
0
        public ActionResult SaveListViewCutomization(string model)
        {
            long result = 0;

            try
            {
                ListViewCustomization objModel = JsonConvert.DeserializeObject <ListViewCustomization>(model);
                MapListViewImple      objImple = new MapListViewImple(objModel.FeatureId);
                result = objImple.SaveListViewCustomizationInfo(objModel);
            }
            catch (Exception ex)
            {
                result = -494;
            }

            return(Content(result.ToString()));
        }
Beispiel #3
0
        public string GetCustomerListtView(string searchField, string q)
        {
            // FeatureId for products view autocomplete list view data is "1"
            MapListViewImple _listView = new MapListViewImple(Convert.ToInt32(EnumListViews.Customers));

            PLog.Info("BEGIN::Controller > GridStock, Method > WarehouseData");
            List <Dictionary <string, object> > rows = new List <Dictionary <string, object> >();

            System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
            Dictionary <string, object> row;

            try
            {
                DataTable dt = new DataTable();
                dt = _listView.GetCustomerListViewData(1, searchField, q);
                if (dt != null)
                {
                    foreach (DataRow dr in dt.Rows)
                    {
                        row = new Dictionary <string, object>();
                        foreach (DataColumn col in dt.Columns)
                        {
                            row.Add(col.ColumnName, dr[col]);
                        }
                        rows.Add(row);
                    }
                }
            }
            catch (Exception ex)
            {
                PLog.Error("Error::Controller >GridStock, Method >WarehouseData", ex);
                throw;
            }
            PLog.Info("END::Controller > GridStock, Method > WarehouseData");
            return(serializer.Serialize(rows));
        }
Beispiel #4
0
        public void GetVendorListViewOptions()
        {
            MapListViewImple _vendorListView = new MapListViewImple((int)EnumListViews.Customers);

            this.CustomerOptions = _vendorListView.GetListViewOptions();
        }
Beispiel #5
0
        public void GetWareHouseListViewOptions()
        {
            MapListViewImple _wareHouseListView = new MapListViewImple((int)EnumListViews.WareHouses);

            this.WareHouseOptions = _wareHouseListView.GetListViewOptions();
        }
Beispiel #6
0
        public void GetProductsListViewOptions()
        {
            MapListViewImple _productsListView = new MapListViewImple((int)EnumListViews.Products);

            this.ProductsOptions = _productsListView.GetListViewOptions();
        }