protected bool Exists(PbknityarncountModel model, bool isNew) { PbknityarncountTable table = new PbknityarncountTable(); SelectSqlSection sql = DataAccess.DefaultDB.Select(table, QueryColumn.All().Count()) .Where(table.YarnCount == model.YarnCount && table.IsActive == model.IsActive ); return(sql.ToScalar <int>() > 0); }
public static DataSet GetProduct(string productId) { DataSet ds = Common.DB.Select(Tables.t_Product, QueryColumn.All(Tables.t_Product), Tables.t_Interface.IOC_Class_Alias, Tables.t_Interface.IOC_Class_Parameters) .LeftJoin(Tables.t_Interface, Tables.t_Product.Interface_Id == Tables.t_Interface.Id) .Where(Tables.t_Product.productID == productId) .Where(Tables.t_Product.Enabled == true) .ToDataSet(); return(ds); }
protected bool Exists(QcfinishdtlModel model, bool isNew) { QcfinishdtlTable table = new QcfinishdtlTable(); SelectSqlSection sql = DataAccess.DefaultDB.Select(table, QueryColumn.All().Count()) .Where(table.Iden == model.Iden && table.QualityCode == model.QualityCode && table.FinishingCode == model.FinishingCode ); return(sql.ToScalar <int>() > 0); }
protected bool Exists(PbknitdyemethodModel model, bool isNew) { PbknitdyemethodTable table = new PbknitdyemethodTable(); SelectSqlSection sql = DataAccess.DefaultDB.Select(table, QueryColumn.All().Count()) .Where(table.DyeMethod == model.DyeMethod && table.DyeType == model.DyeType && table.Description == model.Description ); return(sql.ToScalar <int>() > 0); }
protected bool Exists(PbknitparameterModel model, bool isNew) { PbknitparameterTable table = new PbknitparameterTable(); SelectSqlSection sql = DataAccess.DefaultDB.Select(table, QueryColumn.All().Count()) .Where(table.Sort == model.Sort && table.Parameter == model.Parameter && table.IsActive == model.IsActive ); return(sql.ToScalar <int>() > 0); }
protected bool Exists(PbknitfinishModel model, bool isNew) { PbknitfinishTable table = new PbknitfinishTable(); SelectSqlSection sql = DataAccess.DefaultDB.Select(table, QueryColumn.All().Count()) .Where(table.FinishingCode == model.FinishingCode && table.FinishingName == model.FinishingName && table.Description == model.Description && table.WashingFlag == model.WashingFlag && table.IsActive == model.IsActive ); return(sql.ToScalar <int>() > 0); }
protected bool Exists(PbknityarntypeModel model, bool isNew) { PbknityarntypeTable table = new PbknityarntypeTable(); SelectSqlSection sql = DataAccess.DefaultDB.Select(table, QueryColumn.All().Count()) .Where(table.YarnType == model.YarnType && table.Description == model.Description && table.IeDescription == model.IeDescription && table.CustomerDescription == model.CustomerDescription && table.IsActive == model.IsActive ); return(sql.ToScalar <int>() > 0); }
protected bool Exists(QcmaininfologModel model, bool isNew) { QcmaininfologTable table = new QcmaininfologTable(); SelectSqlSection sql = DataAccess.DefaultDB.Select(table, QueryColumn.All().Count()) .Where(table.QualityCode == model.QualityCode && table.Status == model.Status && table.EditReason == model.EditReason && table.EditorContent == model.EditorContent && table.Editor == model.Editor && table.EditorTime == model.EditorTime ); return(sql.ToScalar <int>() > 0); }
protected bool Exists(PbknitconstructionModel model, bool isNew) { PbknitconstructionTable table = new PbknitconstructionTable(); SelectSqlSection sql = DataAccess.DefaultDB.Select(table, QueryColumn.All().Count()) .Where(table.Construction == model.Construction && table.Description == model.Description && table.DescriptionCn == model.DescriptionCn && table.SingleDouble == model.SingleDouble && table.IsSpecial == model.IsSpecial && table.IsActive == model.IsActive ); return(sql.ToScalar <int>() > 0); }
protected bool Exists(QcyarndtlModel model, bool isNew) { QcyarndtlTable table = new QcyarndtlTable(); SelectSqlSection sql = DataAccess.DefaultDB.Select(table, QueryColumn.All().Count()) .Where(table.Iden == model.Iden && table.QualityCode == model.QualityCode && table.YarnType == model.YarnType && table.YarnCount == model.YarnCount && table.Threads == model.Threads && table.YarnRatio == model.YarnRatio && table.WarpWeft == model.WarpWeft && table.YarnDensity == model.YarnDensity ); return(sql.ToScalar <int>() > 0); }
protected bool Exists(QcavailablewidthModel model, bool isNew) { QcavailablewidthTable table = new QcavailablewidthTable(); SelectSqlSection sql = DataAccess.DefaultDB.Select(table, QueryColumn.All().Count()) .Where(table.Iden == model.Iden && table.QualityCode == model.QualityCode && table.Gauge == model.Gauge && table.Diameter == model.Diameter && table.TotalNeedles == model.TotalNeedles && table.Width == model.Width && table.MaxWidth == model.MaxWidth && table.UpdatedBy == model.UpdatedBy && table.UpdatedTime == model.UpdatedTime ); return(sql.ToScalar <int>() > 0); }
protected bool Exists(QccustomerlibraryModel model, bool isNew) { QccustomerlibraryTable table = new QccustomerlibraryTable(); SelectSqlSection sql = DataAccess.DefaultDB.Select(table, QueryColumn.All().Count()) .Where(table.Iden == model.Iden && table.QualityCode == model.QualityCode && table.BuyerId == model.BuyerId && table.Brand == model.Brand && table.CustomerQualityId == model.CustomerQualityId && table.Sales == model.Sales && table.SalesGroup == model.SalesGroup && table.MillComments == model.MillComments && table.IsFirstOwner == model.IsFirstOwner && table.CreateDate == model.CreateDate && table.Creator == model.Creator ); return(sql.ToScalar <int>() > 0); }
protected void btnQueryIdendity_Click(object sender, EventArgs e) { string idendity = this.txtIdendity.Text.Trim(); DataSet ds = Common.DB.Select(Tables.t_Case, QueryColumn.All(Tables.t_Case), Tables.t_User.displayname, Tables.t_Product.productName) .Join(Tables.t_User, Tables.t_User.username == Tables.t_Case.caseOwner) .Join(Tables.t_Product, Tables.t_Product.productID == Tables.t_Case.productID) .Where(Tables.t_Case.customerID == idendity) .OrderBy(Tables.t_Case.datetime.Desc) .ToDataSet(); if (ds.Tables[0].Rows.Count > 0) { this.GridView1.DataSource = ds; this.GridView1.DataBind(); this.MultiView1.ActiveViewIndex = 1; //DataRow dr = ds.Tables[0].Rows[0]; //bool enabled = Convert.ToBoolean(dr["enabled"]); //if (enabled) //{ // this.DetailsView1.DataSource = ds; // this.DetailsView1.DataBind(); // this.MultiView1.ActiveViewIndex = 1; Common.DB.Update(Tables.t_Case) .AddColumn(Tables.t_Case.isQueryed, true) .AddColumn(Tables.t_Case.dateQueryed, DateTime.Now) .Where(Tables.t_Case.customerID == idendity) .Execute(); //} //else // this.lblInfo.Text = "该身份证号码相关的信息已被作废!"; } else { this.lblInfo.Text = "未查询到与该身份证号码相关的信息!"; } }