Помогите с Using и общий код

смм24

Client
Регистрация
05.07.2017
Сообщения
76
Благодарностей
10
Баллы
8
есть таблица с объектами, из которой первая строка раскладывается по переменным и удаляется
сейчас реализовано так(проэкт без браузера)
Код:
var t=project.Tables["objects"];

project.Variables["id"].Value=t.GetCell(0,0);
project.Variables["operation_id"].Value=t.GetCell(1,0);
project.Variables["type_id"].Value=t.GetCell(2,0);
project.Variables["object_id"].Value=t.GetCell(3,0);
project.Variables["street"].Value=t.GetCell(4,0);
project.Variables["house"].Value=t.GetCell(5,0);
project.Variables["description"].Value=t.GetCell(6,0);
project.Variables["price"].Value=t.GetCell(7,0);
project.Variables["furniture"].Value=t.GetCell(8,0);
project.Variables["washer"].Value=t.GetCell(9,0);
project.Variables["heater"].Value=t.GetCell(10,0);
project.Variables["fridge"].Value=t.GetCell(11,0);
project.Variables["tv"].Value=t.GetCell(12,0);
project.Variables["internet"].Value=t.GetCell(13,0);
project.Variables["window"].Value=t.GetCell(14,0);
project.Variables["shower"].Value=t.GetCell(15,0);
project.Variables["balcony"].Value=t.GetCell(16,0);
project.Variables["toilet"].Value=t.GetCell(17,0);
project.Variables["floor"].Value=t.GetCell(18,0);
project.Variables["floors"].Value=t.GetCell(19,0);
project.Variables["wall_material"].Value=t.GetCell(20,0);
project.Variables["all_area"].Value=t.GetCell(21,0);
project.Variables["living_area"].Value=t.GetCell(22,0);
project.Variables["kitchen_area"].Value=t.GetCell(23,0);
project.Variables["layout"].Value=t.GetCell(24,0);
project.Variables["latitude"].Value=t.GetCell(25,0);
project.Variables["longitude"].Value=t.GetCell(26,0);
project.Variables["inet_title"].Value=t.GetCell(27,0);
project.Variables["city"].Value=t.GetCell(28,0);
project.Variables["region"].Value=t.GetCell(29,0);
project.Variables["landmark"].Value=t.GetCell(30,0);
project.Variables["user_id"].Value=t.GetCell(31,0);
project.Variables["photos"].Value=t.GetCell(32,0);
project.Variables["adv_number"].Value=t.GetCell(33,0);
project.Variables["adv_mail"].Value=t.GetCell(34,0);
project.Variables["new_house"].Value=t.GetCell(35,0);
project.Variables["process"].Value=t.GetCell(36,0);
project.Variables["name"].Value=t.GetCell(37,0);
project.Variables["male"].Value=t.GetCell(38,0);

t.DeleteRow(0);
Возможно сделать чтобы это действие выполнялось, отдельным классом в общем коде и также складывало по переменным проэкта. Чтобы только путь к таблице передавать при вызове.
С классами пока не очень получается
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)