Exemplo n.º 1
0
        /// <summary>
        /// Reload data
        /// </summary>
        void reload()
        {
            Common.BLL.Logic.GasStation.Base__PlateCity lPlateCity = new Common.BLL.Logic.GasStation.Base__PlateCity(Common.Enum.EDatabase.GasStation);

            CommandResult opResult = lPlateCity.allData("", "code, city", false);

            resultGrid.DataSource = opResult.model;
            resultGrid.loadHeader(this.GetType().Name);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Get Name City and Get cityId
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        private string getNameCity(string code)
        {
            string result = null;

            Common.BLL.Logic.GasStation.Base__PlateCity lPlateCity = new Common.BLL.Logic.GasStation.Base__PlateCity(Common.Enum.EDatabase.GasStation);
            DataTable resultPlateCity = lPlateCity.allData("", "", false).model as DataTable;

            var resultItem = (from myRow in resultPlateCity.AsEnumerable()
                              where myRow.Field <string>("code") == code
                              select myRow).FirstOrDefault();

            if (null != resultItem)
            {
                plateModel.plateCityId = (int)resultItem.ItemArray[0];
                result = resultItem.ItemArray[3].ToString();
            }

            return(result);
        }