Subsnic instance!

Source: Internet
Author: User

Using system;
Using system. Collections. Generic;
Using system. text;
Using system. Data;
Using subsonic;
Using ygapp. Dal;

Namespace BLL
{
Public class epiboly
{
Public datatable readepiboly ()
{
Query q = ygapp. Dal. epiboly. createquery ();
Q. addwhere (ygapp. Dal. epiboly. Columns. Tag, 0 );
Datatable dtb = Q. executedataset (). Tables [0];
Return dtb;
}
Public datatable readepiboly (int id)
{
Query q = ygapp. Dal. epiboly. createquery ();
Q. addwhere (ygapp. Dal. epiboly. Columns. ID, ID );
Datatable dtb = Q. executedataset (). Tables [0];
Return dtb;
}
Public static bool del (int id)
{

Query auditing = ygapp. Dal. epiboly. createquery ();

Auditing. querytype = querytype. update;
Auditing. addwhere (ygapp. Dal. epiboly. Columns. ID, ID );
Auditing. addupdatesetting (ygapp. Dal. epiboly. Columns. Tag, 1 );
Try
{
Auditing. Execute ();
Return true;
}
Catch
{
Return false;
}

}
Public bool Update (int id, string itamname, string name, string email, string mobile, string telephone, string reqintro, datetime? Writetime, Int? Tag)
{

// Query auditing = ygapp. Dal. epiboly. createquery ();

// Auditing. querytype = querytype. update;
// Auditing. addwhere (ygapp. Dal. epiboly. Columns. ID, ID );
// Auditing. addupdatesetting (ygapp. Dal. epiboly. Columns. itamname, itamname );
// Auditing. addupdatesetting (ygapp. Dal. epiboly. Columns. Name, name );
// Auditing. addupdatesetting (ygapp. Dal. epiboly. Columns. Email, email );
// Auditing. addupdatesetting (ygapp. Dal. epiboly. Columns. Mobile, mobile );
// Auditing. addupdatesetting (ygapp. Dal. epiboly. Columns. Telephone, telephone );
// Auditing. addupdatesetting (ygapp. Dal. epiboly. Columns. reqintro, reqintro );
// Auditing. addupdatesetting (ygapp. Dal. epiboly. Columns. writetime, writetime );
/// Auditing. addupdatesetting (ygapp. Dal. epiboly. Columns. itamname, itamname );

// try
// {
// auditing. execute ();
// return true;
//}
// catch
// {
// return false;
//}
epibolycontroller MC = new epibolycontroller ();

Try
{
MC. Update (ID, itamname, name, email, mobile, telephone, reqintro, writetime, tag );
Return true;
}
Catch
{
Return false;
}

}
}
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.