コード例 #1
0
        protected DataSet.DSParameter baseGet()
        {
            DataSet.DSParameter ds = new DataSet.DSParameter();
            _base.SetConnection();
            _db = _base.GetDatabase();
            ds.Tables.Add(_listTable);
            ds.Load(_base.GetItem(), LoadOption.OverwriteChanges, _listTable);
            return ds;


        }
コード例 #2
0
ファイル: Event.cs プロジェクト: shhyder/MapApplication
        public System.Data.DataSet GetEventList(string zipcode, int? distance,
        ref decimal startLatitude, ref decimal startLongitude, ref bool is_Valid_Postal_Code, string start_Date, string end_Date)
        {



            DataAccessLayer.Parameter.ZipCodes obj2 = new DataAccessLayer.Parameter.ZipCodes();
            obj2.SetConnection();
            _db = obj2.GetDatabase();
            obj2._zipcodes_ID = zipcode;

            DataSet.DSParameter ds = new DataSet.DSParameter();
            ds.Load(obj2.GetItem(), LoadOption.OverwriteChanges, ds.ZipCodes.TableName);

            System.Data.DataSet __ds = new System.Data.DataSet();

            if (ds.ZipCodes.Count == 0)
            {
                __ds.Tables.Add("List");
                is_Valid_Postal_Code = false;
                return __ds;
            }


            startLatitude = ds.ZipCodes[0].Latitude;
            startLongitude = ds.ZipCodes[0].Longitude;






            //_is_Single_Transaction = false;
            //bool is_Valid = false;
            try
            {
                DataAccessLayer.Search.Event obj = new DataAccessLayer.Search.Event();
                obj.SetConnection();
                _db = obj.GetDatabase();
                IDataReader dr = obj.GetEventList(startLatitude, startLongitude, distance, start_Date, end_Date);
                __ds.Load(dr, LoadOption.OverwriteChanges, "List");

            }
            catch
            {
                //_base.RollBackTransaction();
                //throw;
            }

            is_Valid_Postal_Code = true;
            return __ds;
        }
コード例 #3
0
ファイル: Search.cs プロジェクト: shhyder/MapApplication
        public DataSet.DSParameter Get()
        {
            DataSet.DSParameter ds = new DataSet.DSParameter();
            //_is_Single_Transaction = false;
            try
            {
                _base = new DataAccessLayer.Distributor.Distributor();
                _base.SetConnection();
                _db = _base.GetDatabase();
                _base._ID = _ID;
                ds.Load(_base.GetItem(), LoadOption.OverwriteChanges, ds.Distributor.TableName);
            }
            catch
            {
                //_base.RollBackTransaction();
                //throw;
            }

            return ds;
        }
コード例 #4
0
        public JsonResult Save()
        {


            StoreManifest stm = new StoreManifest();


            if (!Validate(ref stm))
            {
                BusinessLogic.Distributor.Distributor sp = new BusinessLogic.Distributor.Distributor();
                DataSet.DSParameter ds = new DataSet.DSParameter();

                ds.Distributor.IDColumn.ReadOnly = false;


                ds.Distributor.AddDistributorRow(stm.Is_Active, Convert.ToInt32(stm.Code), stm.Store, stm.City, stm.State,
                    stm.FullAddress, Convert.ToDecimal(stm.Latitude), Convert.ToDecimal(stm.Longitude), stm.Email1, stm.ZipCode, stm.Address, stm.Street_No,
                    stm.Street_Name, stm.Country, stm.Phone1, stm.Phone2, stm.Email2, stm.Website, stm.Is_Email1_Display, stm.Is_Email2_Display,
                    stm.Is_Phone1_Display, stm.Is_Phone2_Display, stm.Is_Website_Display);
                ds.EnforceConstraints = false;
                ds.Distributor[0]["ID"] = Convert.ToInt32(stm.ID);

                if (stm.hidState == 3)
                {
                    sp.New(ds);
                }
                else
                {
                    sp.Update(ds);
                }
                UpdateCache();
            }


            return this.Json(stm, JsonRequestBehavior.AllowGet);
        }
コード例 #5
0
        DataSet.DSParameter SetViewToDS(FormCollection collection)
        {


            DataSet.DSParameter ds = new DataSet.DSParameter();
            DataSet.DSParameter.Product_TypeRow row = ds.Product_Type.NewProduct_TypeRow();


            row[ds.Product_Type.Product_Type_IDColumn] = collection[ UIProductType.hidProductTypeID.ToString()];
            //row[ds.Product_Type..LongitudeColumn] = collection[UIProductType.txtDescription.ToString()];
            row[ds.Product_Type.Product_Type_IDColumn] = 1;
            row[ds.Product_Type.Product_TypeColumn] = collection[UIProductType.txtEnterDate.ToString()];
            

            //row[ds.Product_Type.BuildingAppartmentColumn] = collection[UIProduct_Type.txtBuildingAppartment.ToString()];
            //row[ds.Product_Type.Street_NoColumn] = collection[UIProduct_Type.txtStreet_No.ToString()];
            //row[ds.Product_Type.Street_NameColumn] = collection[UIProduct_Type.txtStreet_Name.ToString()];
            //row[ds.Product_Type.Zip_CodeColumn] = collection[UIProduct_Type.txtZipCode.ToString()];
            //row[ds.Product_Type.CityColumn] = collection[UIProductType.txtProductType.ToString()];
            //row[ds.Product_Type.StateColumn] = collection[UIProductType.txtStatus.ToString()];
            //row[ds.Product_Type.CountryColumn] = collection[UIProduct_Type.txtCountry.ToString()];








            ds.Product_Type.AddProduct_TypeRow(row);
            ds.AcceptChanges();
            return ds;
        }
コード例 #6
0
        public JsonResult Save()
        {


            CategoryManifest pm = new CategoryManifest();

            // 
            if (!Validate(ref pm))
            {
                BusinessLogic.Product_Type.Product_Type sp = new BusinessLogic.Product_Type.Product_Type();
                DataSet.DSParameter ds = new DataSet.DSParameter();

                ds.Product_Type.Product_Type_IDColumn.ReadOnly = false;

                ds.Product_Type.AddProduct_TypeRow(pm.category, 1, DateTime.Now, "", pm.is_Active);
                ds.EnforceConstraints = false;
                ds.Product_Type[0]["Product_Type_ID"] = Convert.ToInt32(pm.category_ID);

                if (pm.hidState == 3)
                {
                    sp.New(ds);
                }
                else
                {
                    sp.Update(ds);
                }
                UpdateCache();
            }


            return this.Json(pm, JsonRequestBehavior.AllowGet);
        }
コード例 #7
0
        DataSet.DSParameter SetViewToDS(FormCollection collection)
        {


            DataSet.DSParameter ds = new DataSet.DSParameter();
            DataSet.DSParameter.AttributeRow row = ds.Attribute.NewAttributeRow();


            row[ds.Attribute.Attribute_IDColumn] = collection[ UIAttribute.hidAttribute_ID.ToString()];
            row[ds.Attribute.AttributeColumn] = collection[UIAttribute.txtAttribute.ToString()];
            
            ds.Attribute.AddAttributeRow(row);


            DataSet.DSParameter.Product_Type_AttributeRow row2 = ds.Product_Type_Attribute.NewProduct_Type_AttributeRow();
            row2.Attribute_ID = 0;
            row2.Category_ID = 0;
            row2.Product_Type_ID = Convert.ToInt32( collection[UIAttribute.hidProduct_Type_ID.ToString()] );

            ds.Product_Type_Attribute.AddProduct_Type_AttributeRow(row2);

            ds.AcceptChanges();
            return ds;
        }
コード例 #8
0
ファイル: Search.cs プロジェクト: shhyder/MapApplication
        public System.Data.DataSet GetProductList(string zipcode, int? distance,
         string product_Type_ID, string attribute_ID, string attribute_Variant_ID)
        {
            decimal startLatitude;
            decimal startLongitude;


            DataAccessLayer.Parameter.ZipCodes obj2 = new DataAccessLayer.Parameter.ZipCodes();
            obj2.SetConnection();
            _db = obj2.GetDatabase();
            obj2._zipcodes_ID = zipcode;

            DataSet.DSParameter ds = new DataSet.DSParameter();
            ds.Load(obj2.GetItem(), LoadOption.OverwriteChanges, ds.ZipCodes.TableName);
            startLatitude = ds.ZipCodes[0].Latitude;
            startLongitude = ds.ZipCodes[0].Longitude;

            System.Data.DataSet __ds = new System.Data.DataSet();
            //_is_Single_Transaction = false;
            bool is_Valid = false;
            try
            {
                DataAccessLayer.Search.Search obj = new DataAccessLayer.Search.Search();
                obj.SetConnection();
                _db = obj.GetDatabase();
                IDataReader dr = obj.GetProductList(startLatitude, startLongitude, distance, product_Type_ID, attribute_ID, attribute_Variant_ID);

                __ds.Load(dr, LoadOption.OverwriteChanges, "List");




            }
            catch
            {
                //_base.RollBackTransaction();
                //throw;
            }

            return __ds;
        }
コード例 #9
0
        public JsonResult Save()
        {


            StoreManifest stm = new StoreManifest();

             
            if (!Validate(ref stm))
            {
                BusinessLogic.Marker.Marker sp = new BusinessLogic.Marker.Marker();
                DataSet.DSParameter ds = new DataSet.DSParameter();

                ds.Marker.Marker_IDColumn.ReadOnly = false;


                ds.Marker.AddMarkerRow(stm.Marker, stm.Address, stm.City, stm.State, stm.Country,Convert.ToDecimal( stm.Latitude ), Convert.ToDecimal(stm.Longitude), stm.Is_Recurring_Event, 0,
                    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
                   
                ds.EnforceConstraints = false;
                ds.Marker[0]["Marker_ID"] = Convert.ToInt32(stm.ID);

                if (stm.hidState == 3)
                {
                    sp.New(ds);
                }
                else
                {
                    sp.Update(ds);
                }
                UpdateCache();
            }


            return this.Json(stm, JsonRequestBehavior.AllowGet);
        }
コード例 #10
0
        DataSet.DSParameter SetViewToDS(FormCollection collection)
        {


            DataSet.DSParameter ds = new DataSet.DSParameter();
            DataSet.DSParameter.Attribute_VariantRow row = ds.Attribute_Variant.NewAttribute_VariantRow();
            row[ds.Attribute_Variant.Attribute_Variant_IDColumn] = collection[UIAttributeVariant.hidAttribute_ID.ToString()];

            row[ds.Attribute_Variant.Attribute_IDColumn] = collection[UIAttributeVariant.hidAttribute_ID.ToString()];
            row[ds.Attribute_Variant.Attribute_VariantColumn] = collection[UIAttributeVariant.txtAttributeVariant.ToString()];
         
            ds.Attribute_Variant.AddAttribute_VariantRow(row);

            ds.AcceptChanges();
            return ds;
        }
コード例 #11
0
        public JsonResult Save()
        {


            ProductManifest pm = new ProductManifest();

            // 
            if (!Validate(ref pm))
            {
                BusinessLogic.Product.Product sp = new BusinessLogic.Product.Product();
                DataSet.DSParameter ds = new DataSet.DSParameter();

                ds.Product.Product_IDColumn.ReadOnly = false;
                
                ds.Product.AddProductRow(pm.product, pm.code_To_Display, pm.product_Code, 1, pm.product_Type,
                        1, DateTime.Now, pm.description, pm.is_Active, pm.file_Name, "", "", pm.product_Link);
                ds.EnforceConstraints = false;
                ds.Product[0]["Product_ID"] = Convert.ToInt32( pm.product_ID );

                if (pm.hidState == 3)
                {
                    sp.New(ds);
                }
                else
                {
                    sp.Update(ds);
                }
                UpdateCache();
            }


            return this.Json(pm, JsonRequestBehavior.AllowGet);
        }