当前位置: 首页>>代码示例>>C#>>正文


C# DataAccess.DB_OPT类代码示例

本文整理汇总了C#中SoMeTech.DataAccess.DB_OPT的典型用法代码示例。如果您正苦于以下问题:C# DB_OPT类的具体用法?C# DB_OPT怎么用?C# DB_OPT使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DB_OPT类属于SoMeTech.DataAccess命名空间,在下文中一共展示了DB_OPT类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Delete

 public override int Delete(DB_OPT dbo)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("delete from GOV_TC_DB_ZSZXFJ ");
     builder.Append(" where PK='" + base.pk + "' ");
     return dbo.ExecutionIsSucess(builder.ToString(), null);
 }
开发者ID:SoMeTech,项目名称:SoMeRegulatory,代码行数:7,代码来源:ZSZXFJDal.cs

示例2: Delete

 public override int Delete(DB_OPT dbo)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("delete from GOV_TC_DB_UNITCOUNT ");
     builder.Append(" where PK = '" + base.PK + "' or PKPath like '%" + base.PK + "%'");
     return dbo.ExecutionIsSucess(builder.ToString(), null);
 }
开发者ID:SoMeTech,项目名称:SoMeRegulatory,代码行数:7,代码来源:UnitCountDal.cs

示例3: GetEgality

 public override UnitCountModel[] GetEgality(bool bj, DB_OPT dbo)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("select  ");
     builder.Append(" * ");
     builder.Append(" from GOV_TC_DB_UNITCOUNT ");
     if (base.Grade >= 0)
     {
         builder.Append(" where Grade='" + base.Grade + "'");
     }
     else
     {
         if (base.PK == "")
         {
             throw new Exception("条件不足.");
         }
         builder.Append(" where Grade=(select Grade from GOV_TC_DB_UNITCOUNT where PK='" + base.PK + "')");
     }
     DataSet set = dbo.BackDataSet(builder.ToString(), null);
     if (set.Tables[0].Rows.Count <= 0)
     {
         return null;
     }
     UnitCountModel[] modelArray = new UnitCountModel[set.Tables[0].Rows.Count];
     for (int i = 0; i < set.Tables[0].Rows.Count; i++)
     {
         modelArray[i] = new UnitCountModel();
         modelArray[i] = this.Getmm(set.Tables[0].Rows[i], bj, dbo);
     }
     return modelArray;
 }
开发者ID:SoMeTech,项目名称:SoMeRegulatory,代码行数:31,代码来源:UnitCountDal.cs

示例4: Add

 public override int Add(DB_OPT dbo)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("insert into gov_tc_db_ServicesConnection(");
     builder.Append("OperationPK,ServicePK,Name,ServiceStep,CompanyPK,BranchPK,ConnectionTypePK,FatherPK,ConnectionPath,Grade,IsHasBaby,TopLevelConnectionPK,IfTax,IfFee,IfLast,Memo)");
     builder.Append(" values (");
     builder.Append(":OperationPK,:ServicePK,:Name,:ServiceStep,:CompanyPK,:BranchPK,:ConnectionTypePK,:FatherPK,:ConnectionPath,:Grade,:IsHasBaby,:TopLevelConnectionPK,:IfTax,:IfFee,:IfLast,:Memo)");
     OracleParameter[] parameters = new OracleParameter[] { new OracleParameter(":OperationPK", OracleType.VarChar, 40), new OracleParameter(":ServicePK", OracleType.VarChar, 40), new OracleParameter(":Name", OracleType.VarChar, 100), new OracleParameter(":ServiceStep", OracleType.Int32, 4), new OracleParameter(":CompanyPK", OracleType.VarChar, 40), new OracleParameter(":BranchPK", OracleType.VarChar, 40), new OracleParameter(":ConnectionTypePK", OracleType.VarChar, 40), new OracleParameter(":FatherPK", OracleType.VarChar, 40), new OracleParameter(":ConnectionPath", OracleType.VarChar, 0xff), new OracleParameter(":Grade", OracleType.Int32, 4), new OracleParameter(":IsHasBaby", OracleType.Char, 1), new OracleParameter(":TopLevelConnectionPK", OracleType.VarChar, 40), new OracleParameter(":IfTax", OracleType.Char, 1), new OracleParameter(":IfFee", OracleType.Char, 1), new OracleParameter(":IfLast", OracleType.Char, 1), new OracleParameter(":Memo", OracleType.VarChar, 0xff) };
     parameters[0].Value = base.OperationPK;
     parameters[1].Value = base.ServicePK;
     parameters[2].Value = base.Name;
     parameters[3].Value = base.ServiceStep;
     parameters[4].Value = base.CompanyPK;
     parameters[5].Value = base.BranchPK;
     parameters[6].Value = base.ConnectionTypePK;
     parameters[7].Value = base.FatherPK;
     parameters[8].Value = base.ConnectionPath;
     parameters[9].Value = base.Grade;
     parameters[10].Value = base.IsHasBaby;
     parameters[11].Value = base.TopLevelConnectionPK;
     parameters[12].Value = base.IfTax;
     parameters[13].Value = base.IfFee;
     parameters[14].Value = base.IfLast;
     parameters[15].Value = base.Memo;
     return dbo.ExecutionIsSucess(builder.ToString(), parameters, "");
 }
开发者ID:SoMeTech,项目名称:SoMeRegulatory,代码行数:26,代码来源:ServicesConnectionDal.cs

示例5: Delete

 public override int Delete(DB_OPT dbo)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("delete DB_OPERATIONLOG ");
     builder.Append(" where pk='" + base.pk + "' ");
     return dbo.ExecutionIsSucess(builder.ToString(), null);
 }
开发者ID:SoMeTech,项目名称:SoMeRegulatory,代码行数:7,代码来源:OperationLogDal.cs

示例6: checkIsRepeat

 public bool checkIsRepeat(string text, string sql)
 {
     bool flag = false;
     try
     {
         this.dbo = new DB_OPT();
         this.dbo.Open();
         DataSet set = new DataSet();
         set = this.dbo.BackDataSet(sql, null);
         if ((set != null) && (set.Tables[0].Rows.Count > 0))
         {
             for (int i = 0; i < set.Tables[0].Rows.Count; i++)
             {
                 if (text == set.Tables[0].Rows[0][0].ToString())
                 {
                     flag = true;
                 }
             }
         }
         return flag;
     }
     catch (Exception)
     {
     }
     finally
     {
         if (this.dbo != null)
         {
             this.dbo.Close();
         }
     }
     return flag;
 }
开发者ID:SoMeTech,项目名称:SoMeRegulatory,代码行数:33,代码来源:ifExist.cs

示例7: Delete

 public int Delete(string PK, DB_OPT dbo)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("delete from GOV_TC_DB_SFZSZXFJ ");
     builder.Append(" where PK=" + PK);
     return dbo.ExecutionIsSucess(builder.ToString(), null);
 }
开发者ID:SoMeTech,项目名称:SoMeRegulatory,代码行数:7,代码来源:SFZSZXFJDal.cs

示例8: Delete

 public override void Delete(DB_OPT dbo)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("delete from DB_Bank ");
     builder.Append(" where BankPK='" + base.BankPK + "'");
     dbo.ExecutionIsSucess(builder.ToString(), null);
 }
开发者ID:SoMeTech,项目名称:SoMeRegulatory,代码行数:7,代码来源:BankDal.cs

示例9: Add

 public override int Add(DB_OPT dbo)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("insert into gov_tc_db_ServicesRegister(");
     builder.Append("ServiceTypePK,Name,Path,ClassName,ContParameters,IfTwoCont,Method,IfTwoMet,Parameters,Discription,GetServiceType,StartSign,InTime,OutTime,FatherPK,IsHasBaby,Grade,PKPath,MaxNum)");
     builder.Append(" values (");
     builder.Append(":ServiceTypePK,:Name,:Path,:ClassName,:ContParameters,:IfTwoCont,:Method,:IfTwoMet,:Parameters,:Discription,:GetServiceType,:StartSign,:InTime,:OutTime,:FatherPK,:IsHasBaby,:Grade,:PKPath,:MaxNum)");
     OracleParameter[] parameters = new OracleParameter[] {
         new OracleParameter(":ServiceTypePK", OracleType.Char, 40), new OracleParameter(":Name", OracleType.VarChar, 40), new OracleParameter(":Path", OracleType.VarChar, 0xff), new OracleParameter(":ClassName", OracleType.VarChar, 40), new OracleParameter(":ContParameters", OracleType.VarChar, 0xff), new OracleParameter(":IfTwoCont", OracleType.Char, 1), new OracleParameter(":Method", OracleType.VarChar, 40), new OracleParameter(":IfTwoMet", OracleType.Char, 1), new OracleParameter(":Parameters", OracleType.VarChar, 0xff), new OracleParameter(":Discription", OracleType.VarChar, 0xff), new OracleParameter(":GetServiceType", OracleType.VarChar, 1), new OracleParameter(":StartSign", OracleType.VarChar, 1), new OracleParameter(":InTime", OracleType.DateTime, 40), new OracleParameter(":OutTime", OracleType.DateTime, 40), new OracleParameter(":FatherPK", OracleType.VarChar, 40), new OracleParameter(":IsHasBaby", OracleType.Char, 1),
         new OracleParameter(":Grade", OracleType.Int32, 4), new OracleParameter(":PKPath", OracleType.Clob), new OracleParameter(":MaxNum", OracleType.Int32, 4)
      };
     parameters[0].Value = base.ServiceTypePK;
     parameters[1].Value = base.Name;
     parameters[2].Value = base.Path;
     parameters[3].Value = base.ClassName;
     parameters[4].Value = base.ContParameters;
     parameters[5].Value = base.IfTwoCont;
     parameters[6].Value = base.Method;
     parameters[7].Value = base.IfTwoMet;
     parameters[8].Value = base.Parameters;
     parameters[9].Value = base.Discription;
     parameters[10].Value = base.GetServiceType;
     parameters[11].Value = base.StartSign;
     parameters[12].Value = base.InTime;
     parameters[13].Value = base.OutTime;
     parameters[14].Value = base.FatherPK;
     parameters[15].Value = base.IsHasBaby;
     parameters[0x10].Value = base.Grade;
     parameters[0x11].Value = base.PKPath;
     parameters[0x12].Value = base.MaxNum;
     return dbo.ExecutionIsSucess(builder.ToString(), parameters, "");
 }
开发者ID:SoMeTech,项目名称:SoMeRegulatory,代码行数:32,代码来源:ServicesRegisterDal.cs

示例10: Exists

 public override int Exists(DB_OPT dbo)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("select count(1) from GOV_TC_DB_ZSZXFJ");
     builder.Append(" where pk='" + base.pk + "' ");
     return dbo.BackIsSelect(builder.ToString(), null);
 }
开发者ID:SoMeTech,项目名称:SoMeRegulatory,代码行数:7,代码来源:ZSZXFJDal.cs

示例11: ChangeChildPkPath

 public static void ChangeChildPkPath(string pk_corp, string pkpath, int grade, DB_OPT dbo)
 {
     CompanyModel model = new CompanyDal();
     CompanyModel[] modelArray = model.GetChilds(pk_corp, false, dbo);
     if (modelArray != null)
     {
         for (int i = 0; i < modelArray.Length; i++)
         {
             model.pk_corp = modelArray[i].pk_corp;
             model.Grade = grade;
             model.PKPath = pkpath;
             model.UpdatePKPathAndGrade(dbo);
             if (modelArray[i].IsHasBaby == "1")
             {
                 ChangeChildPkPath(modelArray[i].pk_corp, pkpath + model.pk_corp + "|", grade + 1, dbo);
             }
         }
     }
     else
     {
         model.pk_corp = pk_corp;
         model.IsHasBaby = "0";
         model.UpdateHasBaby(dbo);
     }
 }
开发者ID:SoMeTech,项目名称:SoMeRegulatory,代码行数:25,代码来源:Companybll.cs

示例12: btDo_Click

 protected void btDo_Click(object sender, EventArgs e)
 {
     try
     {
         this.dbo = new DB_OPT();
         this.dbo.Open();
         this.drpm = new DataRowPowerDal();
         this.drpm.Name = this.txtname.Text.Trim();
         this.drpm.PowerCode = this.txtpowercode.Text.Trim();
         this.drpm.TableName = this.ddltablename.SelectedValue;
         this.drpm.ColumnName = this.ddlColumnName.SelectedValue.Split(new char[] { '|' })[0];
         this.drpm.TJType = this.ddlColumnName.SelectedValue.Split(new char[] { '|' })[1];
         this.drpm.strWhere = this.GetStrWhere();
         this.drpm.Discription = this.txtDiscription.Text.Trim();
         if (this.ifadd.Value == "0")
         {
             this.drpm.PK = this.pk.Value;
             this.drpm.Update(this.dbo);
             Const.DoSuccessOpen("修改成功!", this.Page);
         }
         else
         {
             this.drpm.Add(this.dbo);
             Const.DoSuccessOpen("添加成功!", this.Page);
         }
     }
     catch (Exception exception)
     {
         Const.ShowMessage("操作失败!" + exception.Message, this.Page);
     }
 }
开发者ID:SoMeTech,项目名称:SoMeRegulatory,代码行数:31,代码来源:DataRowPower.aspx.cs

示例13: ChangeChildPkPath

 public static void ChangeChildPkPath(string menupk, string pkpath, int grade, DB_OPT dbo)
 {
     MenuModel model = new MenuDal();
     MenuModel[] childs = model.GetChilds(menupk, dbo);
     if (childs != null)
     {
         for (int i = 0; i < childs.Length; i++)
         {
             model.MemuPK = childs[i].MemuPK;
             model.Grade = grade;
             model.PKPath = pkpath;
             model.UpdatePKPathAndGrade(dbo);
             if (childs[i].IsHasBaby == "1")
             {
                 ChangeChildPkPath(childs[i].MemuPK, pkpath + model.MemuPK + "|", grade + 1, dbo);
             }
         }
     }
     else
     {
         model.MemuPK = menupk;
         model.IsHasBaby = "0";
         model.UpdateHasBaby(dbo);
     }
 }
开发者ID:SoMeTech,项目名称:SoMeRegulatory,代码行数:25,代码来源:MenuDal.cs

示例14: Delete

 public int Delete(string PK, DB_OPT dbo)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("delete from DB_DATATABLE ");
     builder.Append(" where PK='" + PK + "' ");
     return dbo.ExecutionIsSucess(builder.ToString(), null);
 }
开发者ID:SoMeTech,项目名称:SoMeRegulatory,代码行数:7,代码来源:DataTableDal.cs

示例15: GetUserCompany

 public static string GetUserCompany(string username)
 {
     string str = "false";
     DB_OPT dbo = null;
     try
     {
         dbo = new DB_OPT();
         dbo.Open();
         string str2 = "";
         UserDal.GetCompanyPK(username.Trim(), ref str2, dbo);
         if (str2 != "")
         {
             string ccode = "";
             string cname = "";
             CompanyDal.GetCompanyName(str2, ref ccode, ref cname, dbo);
             str = ccode + "," + cname;
         }
     }
     catch (Exception exception)
     {
         new ExceptionLog.ExceptionLog { ErrClassName = "UserBll", ErrMessage = exception.Message.ToString(), ErrMethod = "GetUserCompany()" }.WriteExceptionLog(true);
     }
     finally
     {
         if (dbo != null)
         {
             dbo.Close();
         }
     }
     return str;
 }
开发者ID:SoMeTech,项目名称:SoMeRegulatory,代码行数:31,代码来源:UserBll.cs


注:本文中的SoMeTech.DataAccess.DB_OPT类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。