powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / ADO.NET, LINQ, Entity Framework, NHibernate, DAL, ORM [игнор отключен] [закрыт для гостей] / vs2005, c#, db
1 сообщений из 1, страница 1 из 1
vs2005, c#, db
    #33887466
tors
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Создал пользуясь руководством из msdn проект с бд(борей.mdb)

Creating the ColumnChanging Event Handler
To create the validation event handlers
Open the NorthwindDataSet in the Dataset Designer by double-clicking the NorthwindDataSet.xsd file in Solution Explorer.

Double-click the Quantity column in the OrderDetails table to create the OrderDetailsDataTable_ColumnChanging event handler. (In C# only the data table's partial class will be created.)
//--------------------------------------------------
На это действие у меня появляется код в модуле БорейDataSet.cs

namespace ValidationWalkthrough {


partial class БорейDataSet
{
partial class ЗаказаноDataTable
{


}
}
}

и ни духу обработчика ColumnChanging, ужо потыкал по всем компонентам что на форме и под формой — нема такого — как его добавить? //---------------------------------------------------------------------------------------------
Add code to verify that e.ProposedValue contains values greater than 0. If the proposed value is 0 or less, set the column to indicate that it contains an error.

Paste the following code into the column-changing event handler below the Add user code here comment:

C# Copy Code
if ((short)e.ProposedValue <= 0)
{
e.Row.SetColumnError("Quantity", "Quantity must be greater than 0");
}
else
{
e.Row.SetColumnError("Quantity", "");
}

C ув. Tors
...
Рейтинг: 0 / 0
1 сообщений из 1, страница 1 из 1
Форумы / ADO.NET, LINQ, Entity Framework, NHibernate, DAL, ORM [игнор отключен] [закрыт для гостей] / vs2005, c#, db
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]