• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# XBase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Update

 public static int Update(XBase.Model.Office.SellReport.UserProductInfo model)
 {
     int num = 0;
     string sqlstr = "update officedba.UserProductInfo set [email protected],[email protected],[email protected],[email protected],[email protected] where [email protected]";
     TransactionManager tran = new TransactionManager();
     tran.BeginTransaction();
     SqlParameter[] param = {
                                new SqlParameter("@CompanyCD",SqlDbType.VarChar,50),
                                new SqlParameter("@productNum",SqlDbType.VarChar,50),
                                new SqlParameter("@productName",SqlDbType.VarChar,200),
                                new SqlParameter("@price",SqlDbType.Decimal),
                                new SqlParameter("@bref",SqlDbType.VarChar,500),
                                new SqlParameter("@memo",SqlDbType.VarChar,1000),
                                new SqlParameter("@id",SqlDbType.Int,4)
                            };
     param[0].Value = model.CompanyCD;
     param[1].Value = model.productNum;
     param[2].Value = model.productName;
     param[3].Value = model.price;
     param[4].Value = model.bref;
     param[5].Value = model.memo;
     param[6].Value = model.id;
     try
     {
         num = SqlHelper.ExecuteNonQuery(tran.Trans, CommandType.Text, sqlstr, param);
         tran.Commit();
     }
     catch
     {
         tran.Rollback();
     }
     return num;
 }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:33,代码来源:UserProjectInfoDBHelper.cs


示例2: GetProessList

        public static DataTable GetProessList(string projectid,string summaryid, XBase.Common.UserInfoUtil userinfo)
        {
            string sqlstr = string.Empty;
            string proesslist = "0";
            if (!string.IsNullOrEmpty(summaryid))
            {
                SqlParameter[] param = {
                                           new SqlParameter("@ID",SqlDbType.VarChar,50)
                                       };
                param[0].Value = summaryid;
                DataTable dt = SqlHelper.ExecuteSql("select ProessID from officedba.ProjectConstructionDetails where ID [email protected]", param);
                if (dt != null && dt.Rows.Count > 0)
                {
                    if (dt.Rows[0]["ProessID"].ToString().Trim().Length > 0)
                    {
                        proesslist = dt.Rows[0]["ProessID"].ToString().Trim();
                    }
                }
            }
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("select A.ID,A.SummaryName,isnull(B.CheckFlag,'') checkflag from officedba.ProjectConstructionDetails A ");
            sb.AppendLine("left join ");
            sb.AppendLine("(");
	        sb.AppendLine("    select *,'checked=checked' checkflag from officedba.ProjectConstructionDetails where ID in ( "+proesslist+" )");
            sb.AppendLine(")B on A.ID=B.ID");
            sb.AppendLine("where [email protected] and [email protected]");

            SqlParameter[] parm = {
                                      new SqlParameter("@projectID",SqlDbType.VarChar,50),
                                      new SqlParameter("@companyCD",SqlDbType.VarChar,50)
                                  };
            parm[0].Value = projectid;
            parm[1].Value = userinfo.CompanyCD;
            return SqlHelper.ExecuteSql(sb.ToString(), parm);
        }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:35,代码来源:ProjectConstructionDBHelper.cs


示例3: Add

		/// <summary>
		/// 增加一条数据
		/// </summary>
		public int Add(XBase.Model.Personal.MessageBox.MyContact model)
		{
			StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into officedba.MyContact(");
			strSql.Append("GroupID,CompanyCD,ContactID,Creator,CreateDate,ModifiedDate,ModifiedUserID)");
			strSql.Append(" values (");
			strSql.Append("@GroupID,@CompanyCD,@ContactID,@Creator,@CreateDate,@ModifiedDate,@ModifiedUserID)");
            strSql.Append(";select @[email protected]@IDENTITY");
			SqlParameter[] parameters = {
					new SqlParameter("@GroupID", SqlDbType.Int,4),
					new SqlParameter("@CompanyCD", SqlDbType.VarChar,8),
					new SqlParameter("@ContactID", SqlDbType.Int,4),
					new SqlParameter("@Creator", SqlDbType.Int,4),
					new SqlParameter("@CreateDate", SqlDbType.DateTime),
					new SqlParameter("@ModifiedDate", SqlDbType.DateTime),
					new SqlParameter("@ModifiedUserID", SqlDbType.VarChar,50),
                     new SqlParameter("@ID", SqlDbType.Int,0) };
			parameters[0].Value = model.GroupID;
			parameters[1].Value = model.CompanyCD;
			parameters[2].Value = model.ContactID;
			parameters[3].Value = model.Creator;
			parameters[4].Value = model.CreateDate;
			parameters[5].Value = model.ModifiedDate;
			parameters[6].Value = model.ModifiedUserID;
            parameters[7].Direction = ParameterDirection.Output;

            SqlHelper.ExecuteTransSql(strSql.ToString(), parameters);
            return int.Parse(parameters[7].Value.ToString());
		}
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:32,代码来源:MyContact.cs


示例4: Update

		/// <summary>
		/// 更新一条数据
		/// </summary>
		public void Update(XBase.Model.Personal.MessageBox.MyContact model)
		{
			StringBuilder strSql=new StringBuilder();
            strSql.Append("update officedba.MyContact set ");
			strSql.Append("[email protected],");
			strSql.Append("[email protected],");
			strSql.Append("[email protected],");
			strSql.Append("[email protected],");
			strSql.Append("[email protected],");
			strSql.Append("[email protected],");
			strSql.Append("[email protected]");
			strSql.Append(" where [email protected] ");
			SqlParameter[] parameters = {
					new SqlParameter("@ID", SqlDbType.Int,4),
					new SqlParameter("@GroupID", SqlDbType.Int,4),
					new SqlParameter("@CompanyCD", SqlDbType.VarChar,8),
					new SqlParameter("@ContactID", SqlDbType.Int,4),
					new SqlParameter("@Creator", SqlDbType.Int,4),
					new SqlParameter("@CreateDate", SqlDbType.DateTime),
					new SqlParameter("@ModifiedDate", SqlDbType.DateTime),
					new SqlParameter("@ModifiedUserID", SqlDbType.VarChar,50)};
			parameters[0].Value = model.ID;
			parameters[1].Value = model.GroupID;
			parameters[2].Value = model.CompanyCD;
			parameters[3].Value = model.ContactID;
			parameters[4].Value = model.Creator;
			parameters[5].Value = model.CreateDate;
			parameters[6].Value = model.ModifiedDate;
			parameters[7].Value = model.ModifiedUserID;

            SqlHelper.ExecuteTransSql(strSql.ToString(), parameters);
		}
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:35,代码来源:MyContact.cs


示例5: Update

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public void Update(XBase.Model.SystemManager.SysNotice model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("update pubdba.SysNotice set ");
            strSql.Append("[email protected],");
            strSql.Append("[email protected],");
            strSql.Append("[email protected],");
            strSql.Append("[email protected],");
            strSql.Append("[email protected]");
            strSql.Append(" where [email protected] ");
            SqlParameter[] parameters = {
					new SqlParameter("@ID", SqlDbType.Int,4),
					new SqlParameter("@Title", SqlDbType.NVarChar,50),
					new SqlParameter("@Content", SqlDbType.NText),
					new SqlParameter("@PubDate", SqlDbType.DateTime),
                     new SqlParameter("@OverDate", SqlDbType.DateTime),
					new SqlParameter("@CreatorUserID", SqlDbType.VarChar,50)};
            parameters[0].Value = model.ID;
            parameters[1].Value = model.Title;
            parameters[2].Value = model.Content;
            parameters[3].Value = model.PubDate;
            parameters[4].Value = model.OverDate;
            parameters[5].Value = model.CreatorUserID;

            SqlHelper.ExecuteSql(strSql.ToString(), parameters);
        }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:29,代码来源:SysNotice.cs


示例6: Add

		/// <summary>
		/// 增加一条数据
		/// </summary>
		public int Add(XBase.Model.Personal.MessageBox.PersonalAdviceSend model)
		{
			StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into [officedba].PersonalAdviceSend(");
			strSql.Append("CompanyCD,AdviceType,FromUserID,DoUserID,Title,Content,CreateDate,DisplayName)");
			strSql.Append(" values (");
			strSql.Append("@CompanyCD,@AdviceType,@FromUserID,@DoUserID,@Title,@Content,@CreateDate,@DisplayName)");
            strSql.Append(";select @[email protected]@IDENTITY");
			SqlParameter[] parameters = {
					new SqlParameter("@CompanyCD", SqlDbType.VarChar,8),
					new SqlParameter("@AdviceType", SqlDbType.Char,1),
					new SqlParameter("@FromUserID", SqlDbType.Int,4),
					new SqlParameter("@DoUserID", SqlDbType.Int,4),
					new SqlParameter("@Title", SqlDbType.VarChar,100),
					new SqlParameter("@Content", SqlDbType.VarChar,1024),
					new SqlParameter("@CreateDate", SqlDbType.DateTime),
					new SqlParameter("@DisplayName", SqlDbType.Char,1),
                      new SqlParameter("@ID", SqlDbType.Int,0) };
			parameters[0].Value = model.CompanyCD;
			parameters[1].Value = model.AdviceType;
			parameters[2].Value = model.FromUserID;
			parameters[3].Value = model.DoUserID;
			parameters[4].Value = model.Title;
			parameters[5].Value = model.Content;
			parameters[6].Value = model.CreateDate;
			parameters[7].Value = model.DisplayName;

            parameters[8].Direction = ParameterDirection.Output;

            SqlHelper.ExecuteTransSql(strSql.ToString(), parameters);
            return int.Parse(parameters[8].Value.ToString());
		}
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:35,代码来源:PersonalAdviceSend.cs


示例7: UpdateByID

        public int UpdateByID(XBase.Model.KnowledgeCenter.KnowledgeWarehouse entity)
        {
            SqlParameter[] parameters = new SqlParameter[]{
				SqlParameterHelper.MakeInParam("@ID",SqlDbType.Int,0,entity.ID),
				SqlParameterHelper.MakeInParam("@KnowledgeNo",SqlDbType.VarChar,50,entity.KnowledgeNo),
				SqlParameterHelper.MakeInParam("@Flag",SqlDbType.Char,1,entity.Flag),
				SqlParameterHelper.MakeInParam("@TypeID",SqlDbType.Int,0,entity.TypeID),
				SqlParameterHelper.MakeInParam("@Title",SqlDbType.VarChar,100,entity.Title),
				SqlParameterHelper.MakeInParam("@Keyword",SqlDbType.VarChar,100,entity.Keyword),
				SqlParameterHelper.MakeInParam("@Content",SqlDbType.NText,0,entity.Content),
				SqlParameterHelper.MakeInParam("@IsShow",SqlDbType.Char,1,entity.IsShow),
				SqlParameterHelper.MakeInParam("@SourceFrom",SqlDbType.Char,1,entity.SourceFrom),
				SqlParameterHelper.MakeInParam("@SafeLevel",SqlDbType.Char,1,entity.SafeLevel),
				SqlParameterHelper.MakeInParam("@Author",SqlDbType.VarChar,50,entity.Author),
				SqlParameterHelper.MakeInParam("@Attachment",SqlDbType.VarChar,200,entity.Attachment),
				SqlParameterHelper.MakeInParam("@CreateUserID",SqlDbType.VarChar,20,entity.CreateUserID),
				SqlParameterHelper.MakeInParam("@CreateDate",SqlDbType.DateTime,0,entity.CreateDate),
				SqlParameterHelper.MakeInParam("@ModifiedDate",SqlDbType.DateTime,0,entity.ModifiedDate),
				SqlParameterHelper.MakeInParam("@ModifiedUserID",SqlDbType.VarChar,20,entity.ModifiedUserID),
				SqlParameterHelper.MakeInParam("@ReadTimes",SqlDbType.Int,0,entity.ReadTimes),
				SqlParameterHelper.MakeInParam("@DownloadTimes",SqlDbType.Int,0,entity.DownloadTimes) 
			};
            int result;
            Database.RunProc("[knowdba].KnowledgeWarehouse_UpdateByID", parameters, out result);
            return result;
        }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:26,代码来源:KnowledgeWarehouse.cs


示例8: Add

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(XBase.Model.SystemManager.SysNotice model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into pubdba.SysNotice(");
            strSql.Append("Title,Content,PubDate,OverDate,CreatorUserID)");
            strSql.Append(" values (");
            strSql.Append("@Title,@Content,@PubDate,@OverDate,@CreatorUserID)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
					new SqlParameter("@Title", SqlDbType.NVarChar,50),
					new SqlParameter("@Content", SqlDbType.NText),
					new SqlParameter("@PubDate", SqlDbType.DateTime),
                    new SqlParameter("@OverDate", SqlDbType.DateTime),
					new SqlParameter("@CreatorUserID", SqlDbType.VarChar,50)};
            parameters[0].Value = model.Title;
            parameters[1].Value = model.Content;
            parameters[2].Value = model.PubDate;
            parameters[3].Value = model.OverDate;
            parameters[4].Value = model.CreatorUserID;

            object obj = SqlHelper.GetSingle(strSql.ToString(), parameters);
            if (obj == null)
            {
                return 1;
            }
            else
            {
                return Convert.ToInt32(obj);
            }
        }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:33,代码来源:SysNotice.cs


示例9: Add

		/// <summary>
		/// 增加一条数据
		/// </summary>
		public int Add(XBase.Model.Personal.MessageBox.PublicNotice model)
		{
			StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into [officedba].PublicNotice(");
			strSql.Append("CompanyCD,NewsTitle,NewsContent,IsShow,Status,Comfirmor,ComfirmDate,Creator,CreateDate)");
			strSql.Append(" values (");
			strSql.Append("@CompanyCD,@NewsTitle,@NewsContent,@IsShow,@Status,@Comfirmor,@ComfirmDate,@Creator,@CreateDate)");
			strSql.Append(";select @[email protected]@IDENTITY");
			SqlParameter[] parameters = {
					new SqlParameter("@CompanyCD", SqlDbType.VarChar,8),					
					new SqlParameter("@NewsTitle", SqlDbType.VarChar,100),
					new SqlParameter("@NewsContent", SqlDbType.VarChar,512),
					new SqlParameter("@IsShow", SqlDbType.Char,1),
					new SqlParameter("@Status", SqlDbType.Char,1),					
					new SqlParameter("@Comfirmor", SqlDbType.Int,4),
					new SqlParameter("@ComfirmDate", SqlDbType.DateTime),
					new SqlParameter("@Creator", SqlDbType.Int,4),
					new SqlParameter("@CreateDate", SqlDbType.DateTime),
                     new SqlParameter("@ID", SqlDbType.Int,0) };
			parameters[0].Value = model.CompanyCD;			
			parameters[1].Value = model.NewsTitle;
			parameters[2].Value = model.NewsContent;
			parameters[3].Value = model.IsShow;
			parameters[4].Value = model.Status;			
			parameters[5].Value = model.Comfirmor;
			parameters[6].Value = model.ComfirmDate;
			parameters[7].Value = model.Creator;
			parameters[8].Value = model.CreateDate;

            parameters[9].Direction = ParameterDirection.Output;

            SqlHelper.ExecuteTransSql(strSql.ToString(), parameters);
            return int.Parse(parameters[9].Value.ToString());
		}
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:37,代码来源:PublicNotice.cs


示例10: Update

		/// <summary>
		/// 更新一条数据
		/// </summary>
		public void Update(XBase.Model.Personal.MessageBox.PersonalAdviceSend model)
		{
			StringBuilder strSql=new StringBuilder();
            strSql.Append("update [officedba].PersonalAdviceSend set ");
			strSql.Append("[email protected],");
			strSql.Append("[email protected],");
			strSql.Append("[email protected],");
			strSql.Append("[email protected],");
			strSql.Append("[email protected],");
			strSql.Append("[email protected],");
			strSql.Append("[email protected],");
			strSql.Append("[email protected]");
			strSql.Append(" where [email protected] ");
			SqlParameter[] parameters = {
					new SqlParameter("@ID", SqlDbType.Int,4),
					new SqlParameter("@CompanyCD", SqlDbType.VarChar,8),
					new SqlParameter("@AdviceType", SqlDbType.Char,1),
					new SqlParameter("@FromUserID", SqlDbType.Int,4),
					new SqlParameter("@DoUserID", SqlDbType.Int,4),
					new SqlParameter("@Title", SqlDbType.VarChar,100),
					new SqlParameter("@Content", SqlDbType.VarChar,1024),
					new SqlParameter("@CreateDate", SqlDbType.DateTime),
					new SqlParameter("@DisplayName", SqlDbType.Char,1)};
			parameters[0].Value = model.ID;
			parameters[1].Value = model.CompanyCD;
			parameters[2].Value = model.AdviceType;
			parameters[3].Value = model.FromUserID;
			parameters[4].Value = model.DoUserID;
			parameters[5].Value = model.Title;
			parameters[6].Value = model.Content;
			parameters[7].Value = model.CreateDate;
			parameters[8].Value = model.DisplayName;

            SqlHelper.ExecuteTransSql(strSql.ToString(), parameters);
		}
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:38,代码来源:PersonalAdviceSend.cs


示例11: AddSubBudgetInfo

        public static int AddSubBudgetInfo(SubBudgetModel subBudgetModel, XBase.Common.UserInfoUtil userinfo)
        {
            StringBuilder sqlstr = new StringBuilder();
            sqlstr.Append("insert into officedba.SubBudget(CompanyCD,projectid,BudgetName) values(@CompanyCD,@projectid,@BudgetName)");
            SqlParameter[] param = {
                                       new SqlParameter("@CompanyCD",SqlDbType.VarChar,50),
                                       new SqlParameter("@projectid",SqlDbType.Int),
                                       new SqlParameter("@BudgetName",SqlDbType.VarChar,200)
                                   };
            param[0].Value = userinfo.CompanyCD;
            param[1].Value = subBudgetModel.Projectid;
            param[2].Value = subBudgetModel.BudgetName;

            TransactionManager tran = new TransactionManager();
            int num = 0;
            tran.BeginTransaction();
            try
            {
                num = SqlHelper.ExecuteNonQuery(tran.Trans, CommandType.Text, sqlstr.ToString(), param);
                tran.Commit();
            }
            catch
            {
                tran.Rollback();
            }
            return num;
        }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:27,代码来源:SubBudgetDBHelper.cs


示例12: EditSubBudget

 public static int EditSubBudget(SubBudgetModel subBudgetModel, XBase.Common.UserInfoUtil userinfo)
 {
     StringBuilder sqlstr = new StringBuilder();
     sqlstr.Append("update officedba.SubBudget set [email protected],[email protected] where [email protected]");
     SqlParameter[] param = {
                                new SqlParameter("@BudgetName",SqlDbType.VarChar,200),
                                new SqlParameter("@projectid",SqlDbType.Int,4),
                                new SqlParameter("@ID",SqlDbType.Int)
                            };
     param[0].Value = subBudgetModel.BudgetName;
     param[1].Value = subBudgetModel.Projectid;
     param[2].Value = subBudgetModel.ID;
     TransactionManager tran = new TransactionManager();
     int num = 0;
     tran.BeginTransaction();
     try
     {
         num = SqlHelper.ExecuteNonQuery(tran.Trans, CommandType.Text, sqlstr.ToString(), param);
         tran.Commit();
     }
     catch
     {
         tran.Rollback();
     }
     return num;
 }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:26,代码来源:SubBudgetDBHelper.cs


示例13: Add

 public static int Add(XBase.Model.Office.SellReport.UserProductInfo model)
 {
     int num = 0;
     string sqlstr = "insert into officedba.UserProductInfo(CompanyCD,productNum,productName,price,bref,memo) values(@CompanyCD,@productNum,@productName,@price,@bref,@memo)";
     TransactionManager tran = new TransactionManager();
     tran.BeginTransaction();
     SqlParameter[] param = {
                                new SqlParameter("@CompanyCD",SqlDbType.VarChar,50),
                                new SqlParameter("@productNum",SqlDbType.VarChar,50),
                                new SqlParameter("@productName",SqlDbType.VarChar,200),
                                new SqlParameter("@price",SqlDbType.Decimal),
                                new SqlParameter("@bref",SqlDbType.VarChar,500),
                                new SqlParameter("@memo",SqlDbType.VarChar,1000)
                            };
     param[0].Value = model.CompanyCD;
     param[1].Value = model.productNum;
     param[2].Value = model.productName;
     param[3].Value = model.price;
     param[4].Value = model.bref;
     param[5].Value = model.memo;
     try
     {
         num = SqlHelper.ExecuteNonQuery(tran.Trans, CommandType.Text, sqlstr, param);
         tran.Commit();
     }
     catch
     {
         tran.Rollback();
     }
     return num;
 }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:31,代码来源:UserProjectInfoDBHelper.cs


示例14: Add

		/// <summary>
		/// 增加一条数据
		/// </summary>
		public int Add(XBase.Model.Personal.Culture.CultureType model)
		{
			StringBuilder strSql=new StringBuilder();            
            strSql.AppendLine("set @path =''");
            strSql.AppendLine("select @path=[path] from [officedba].CultureType where [email protected]");
            strSql.AppendLine("insert into [officedba].CultureType(");
			strSql.AppendLine("CompanyCD,TypeName,SupperTypeID,Path)");
			strSql.AppendLine(" values (");
			strSql.AppendLine("@CompanyCD,@TypeName,@SupperTypeID,@Path)");
            strSql.AppendLine("select @[email protected]@IDENTITY");
            strSql.AppendLine("if(@path <> '')");
            strSql.AppendLine("begin");
            strSql.AppendLine("set @[email protected]+'_'");
            strSql.AppendLine("end");
            strSql.AppendLine(";UPDATE [officedba].CultureType SET [path][email protected]+cast(@ID as varchar(10)) WHERE [email protected]");
			SqlParameter[] parameters = {
					new SqlParameter("@CompanyCD", SqlDbType.VarChar,8),
					new SqlParameter("@TypeName", SqlDbType.VarChar,100),
					new SqlParameter("@SupperTypeID", SqlDbType.Int,4),
					new SqlParameter("@Path", SqlDbType.VarChar,512),
                     new SqlParameter("@ID", SqlDbType.Int,0) };
			parameters[0].Value = model.CompanyCD;
			parameters[1].Value = model.TypeName;
			parameters[2].Value = model.SupperTypeID;
			parameters[3].Value = model.Path;

            parameters[4].Direction = ParameterDirection.Output;

            SqlHelper.ExecuteTransSql(strSql.ToString(), parameters);
            return int.Parse(parameters[4].Value.ToString());
		}
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:34,代码来源:CultureType.cs


示例15: GetTableList

        /// <summary>
        /// 返回自定义表列表
        /// </summary>
        /// <returns></returns>
        public static DataSet GetTableList(XBase.Common.UserInfoUtil userinfo)
        {
            SqlParameter[] parameters = {
					new SqlParameter("@companyCD", SqlDbType.VarChar,200)
					};
            parameters[0].Value = userinfo.CompanyCD;
            return SqlHelper.ExecuteSqlX("select *,AliasTableName+'(define.'+CompanyCD+'_'+CustomTableName+')' buildTableName from defdba.CustomTable where [email protected] order by ID", parameters);
        }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:12,代码来源:TableReportDBHelper.cs


示例16: GetProssList

 public static DataSet GetProssList(string projectID, XBase.Common.UserInfoUtil userinfo)
 {
     SqlParameter[] param ={
                             new SqlParameter("@companyCD",SqlDbType.VarChar,50),
                             new SqlParameter("@projectid",SqlDbType.Int,4)
                         };
     param[0].Value = userinfo.CompanyCD;
     param[1].Value = projectID;
     return SqlHelper.ExecuteSqlX("exec officedba.GetProssList @companyCD,@projectid", param);
 }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:10,代码来源:ProjectGanttDBHelper.cs


示例17: InsertReport

        /// <summary>
        /// 
        /// </summary>
        /// <param name="report"></param>
        /// <param name="flag">判断是添加还是修改</param>
        /// <returns></returns>
        public static int InsertReport(ReportTableModel report,XBase.Common.UserInfoUtil userinfo,string ID,string useridlist)
        {
            int num = 0;
            StringBuilder strSql = new StringBuilder();
            if (ID == "0")  //添加
            {
                strSql.Append("insert into defdba.ReportTable(Menuname,CompanyCD,sqlstr,timeFlag,tablelist,excelhead) values(@Menuname,@CompanyCD,@SqlStr,@timeFlag,@tablelist,@excelhead)");
                strSql.Append(";select @@IDENTITY");
                SqlParameter[] parameters = {
					new SqlParameter("@Menuname", SqlDbType.VarChar,200),
                    new SqlParameter("@CompanyCD", SqlDbType.VarChar,200),
					new SqlParameter("@SqlStr", SqlDbType.Text),
					new SqlParameter("@timeFlag", SqlDbType.Int,4),
                    new SqlParameter("@tablelist", SqlDbType.VarChar,100),
                    new SqlParameter("@excelhead", SqlDbType.VarChar,100)
					};
                parameters[0].Value = report.Menuname;
                parameters[1].Value = userinfo.CompanyCD;
                parameters[2].Value = report.SqlStr;
                parameters[3].Value = report.timeFlag;
                parameters[4].Value = report.Tablelist;
                parameters[5].Value = report.Excelhead;
                num = Convert.ToInt32(SqlHelper.ExecuteScalar(strSql.ToString(), parameters));
            }
            else  //修改
            {
                strSql.Append("update defdba.ReportTable set [email protected],[email protected],[email protected],[email protected],[email protected] where [email protected]");
                SqlParameter[] parameters = {
					new SqlParameter("@Menuname", SqlDbType.VarChar,200),
                    new SqlParameter("@CompanyCD", SqlDbType.VarChar,200),
					new SqlParameter("@SqlStr", SqlDbType.Text),
					new SqlParameter("@timeFlag", SqlDbType.Int,4),
                    new SqlParameter("@tablelist", SqlDbType.VarChar,100),
                    new SqlParameter("@ID", SqlDbType.VarChar,100),
                    new SqlParameter("@excelhead", SqlDbType.VarChar,500)
					};
                parameters[0].Value = report.Menuname;
                parameters[1].Value = userinfo.CompanyCD;
                parameters[2].Value = report.SqlStr;
                parameters[3].Value = report.timeFlag;
                parameters[4].Value = report.Tablelist;
                parameters[5].Value = ID;
                parameters[6].Value = report.Excelhead;
                try
                {
                    SqlHelper.ExecuteTransSql(strSql.ToString(),parameters);
                    num = Convert.ToInt32(ID);
                }
                catch { return 0; }
            }
            //添加菜单
            CreateMenu(report.Menuname, num.ToString(), userinfo, useridlist);
            return num;

        }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:61,代码来源:TableReportDBHelper.cs


示例18: Update

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public void Update(XBase.Model.Personal.Memo.PersonalMemo model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("update [officedba].PersonalMemo set ");
            strSql.Append("[email protected],");
            strSql.Append("[email protected],");
            strSql.Append("[email protected],");
            strSql.Append("[email protected],");
            strSql.Append("[email protected],");
            strSql.Append("[email protected],");
            strSql.Append("[email protected],");
            strSql.Append("[email protected],");
            strSql.Append("[email protected],");
            strSql.Append("[email protected],");
            strSql.Append("[email protected],");
            strSql.Append("[email protected],");
            strSql.Append("[email protected],");
            strSql.Append("[email protected]");
            strSql.Append(" where [email protected] ");
            SqlParameter[] parameters = {
					new SqlParameter("@ID", SqlDbType.Int,4),
					new SqlParameter("@CompanyCD", SqlDbType.VarChar,8),
					new SqlParameter("@MemoNo", SqlDbType.VarChar,50),
					new SqlParameter("@TItle", SqlDbType.VarChar,100),
					new SqlParameter("@Content", SqlDbType.NText),
					new SqlParameter("@CanViewUser", SqlDbType.VarChar,1024),
					new SqlParameter("@CanViewUserName", SqlDbType.VarChar,1024),
					new SqlParameter("@Attachment", SqlDbType.VarChar,200),
					new SqlParameter("@Memoer", SqlDbType.Int,4),
					new SqlParameter("@MemoDate", SqlDbType.DateTime),
					new SqlParameter("@Creator", SqlDbType.Int,4),
					new SqlParameter("@CreateDate", SqlDbType.DateTime),
					new SqlParameter("@ModifiedDate", SqlDbType.DateTime),
					new SqlParameter("@ModifiedUserID", SqlDbType.VarChar,50),
                    new SqlParameter("@Status", SqlDbType.VarChar,50)
                                        };
            parameters[0].Value = model.ID;
            parameters[1].Value = model.CompanyCD;
            parameters[2].Value = model.MemoNo;
            parameters[3].Value = model.TItle;
            parameters[4].Value = model.Content;
            parameters[5].Value = model.CanViewUser;
            parameters[6].Value = model.CanViewUserName;
            parameters[7].Value = model.Attachment;
            parameters[8].Value = model.Memoer;
            parameters[9].Value = model.MemoDate;
            parameters[10].Value = model.Creator;
            parameters[11].Value = model.CreateDate;
            parameters[12].Value = model.ModifiedDate;
            parameters[13].Value = model.ModifiedUserID;
            parameters[14].Value = model.Status;

            SqlHelper.ExecuteTransSql(strSql.ToString(), parameters);
        }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:57,代码来源:PersonalMemo.cs


示例19: DataList

 public static DataTable DataList(int pageindex, int pagecount, string OrderBy, XBase.Common.UserInfoUtil userinfo, ref int totalCount)
 {
     StringBuilder sqlstr = new StringBuilder();
     sqlstr.AppendLine("select id,CompanyCD,productNum,productName,convert(decimal(22,"+userinfo.SelPoint+"),price) price,bref,memo from officedba.UserProductInfo where [email protected]");
     
     SqlCommand comm = new SqlCommand();
     comm.Parameters.Add(SqlHelper.GetParameterFromString("@CompanyCD", userinfo.CompanyCD));
     
     comm.CommandText = sqlstr.ToString();
     return SqlHelper.PagerWithCommand(comm, pageindex, pagecount, OrderBy, ref totalCount);
 }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:11,代码来源:UserProjectInfoDBHelper.cs


示例20: Create

		public bool Create(XBase.Model.KnowledgeCenter.KeyWordHistory entity)
		{
			SqlParameter[] parameters = new SqlParameter[]{
				SqlParameterHelper.MakeInParam("@TypeID",SqlDbType.Int,0,entity.TypeID),
				SqlParameterHelper.MakeInParam("@KeyWordName",SqlDbType.VarChar,100,entity.KeyWordName),
				SqlParameterHelper.MakeInParam("@SearchTimes",SqlDbType.Int,0,entity.SearchTimes),
                SqlParameterHelper.MakeInParam("@LastDate",SqlDbType.DateTime,0,entity.LastDate)
			};
			bool result;
			Database.RunProc("[knowdba].KeyWordHistory_Create",parameters,out result); 
			return result;
		}
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:12,代码来源:KeyWordHistory.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# XColor类代码示例发布时间:2022-05-24
下一篇:
C# XBMCRPC类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap