zoukankan      html  css  js  c++  java
  • subsnic实例!

    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;
                }

            }
        }
    }

  • 相关阅读:
    C语言中变量和函数类型
    ubuntu中耳机声音小的解决方案
    数据结构学习4——栈
    Linux 引导过程内幕
    linux gdb 没有符号表被读取。请使用 "file" 命令。
    linux 内存泄漏检查工具
    数据结构学习5——队列
    [转载]Ubuntu垃圾清理
    系统消息
    窗口相关概念和对应关系
  • 原文地址:https://www.cnblogs.com/yuanzhengang/p/1249917.html
Copyright © 2011-2022 走看看