예제 #1
0
 /// <summary>
 /// 插入产品信息数据
 /// </summary>
 /// <param name="_PA01">实体</param>
 /// <returns>结果</returns>
 public int InsertProductBase(ProductBase _ProductBase)
 {
     try
     {
         int num = Provider.ExecuteNonQuery("PRO_PA01", 1, new SqlParameter[] {
             new SqlParameter()
             {
                 ParameterName = @"PA01001", Value = 1, DbType = DbType.Int32
             },
             new SqlParameter()
             {
                 ParameterName = @"PA01003", Value = _ProductBase.PA01003, DbType = DbType.String
             },
             new SqlParameter()
             {
                 ParameterName = @"PA01005", Value = _ProductBase.PA01005, DbType = DbType.String
             },
             new SqlParameter()
             {
                 ParameterName = @"PA01997", Value = "", DbType = DbType.String
             },
             new SqlParameter()
             {
                 ParameterName = @"One", Value = _ProductBase.Priceone, DbType = DbType.String
             },
             new SqlParameter()
             {
                 ParameterName = @"Two", Value = _ProductBase.Pricetwo, DbType = DbType.String
             },
             new SqlParameter()
             {
                 ParameterName = @"Three", Value = _ProductBase.Pricethree, DbType = DbType.String
             },
             new SqlParameter()
             {
                 ParameterName = @"Four", Value = _ProductBase.Pricefour, DbType = DbType.String
             },
             new SqlParameter()
             {
                 ParameterName = @"Netprice", Value = _ProductBase.Netprice, DbType = DbType.String
             },
             new SqlParameter()
             {
                 ParameterName = @"Order", Value = "PA01_Insert", DbType = DbType.String
             }
         });
         return(num);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #2
0
        /// <summary>
        /// 更新汇率
        /// </summary>
        /// <param name="id"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public int UpdateSettings(string id, string value)
        {
            var sql = string.Format(" update  Settings set ModifyOn = GETDATE(),Value = '{0}' where SettingId = '{1}' ", value, id);

            try
            {
                int num = Provider.ExecuteNonQuery(sql, 0, null);
                return(num);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #3
0
 /// <summary>
 /// 新增系统角色资料
 /// </summary>
 /// <param name="_GA02">实体类</param>
 /// <returns>影响行数</returns>
 public int InsertSystemRole(SystemRole _SystemRole)
 {
     try
     {
         int num = Provider.ExecuteNonQuery("PRO_GA02", 1, new SqlParameter[] {
             new SqlParameter()
             {
                 ParameterName = @"GA02001", Value = 0, DbType = DbType.Int32
             },
             new SqlParameter()
             {
                 ParameterName = @"GA02002", Value = _SystemRole.GA02002, DbType = DbType.String
             },
             new SqlParameter()
             {
                 ParameterName = @"GA02003", Value = _SystemRole.GA02003, DbType = DbType.String
             },
             new SqlParameter()
             {
                 ParameterName = @"GA02997", Value = 0, DbType = DbType.Int32
             },
             new SqlParameter()
             {
                 ParameterName = @"MenuId", Value = _SystemRole.MenuId, DbType = DbType.String
             },
             new SqlParameter()
             {
                 ParameterName = @"PowerId", Value = _SystemRole.PowerId, DbType = DbType.String
             },
             new SqlParameter()
             {
                 ParameterName = @"Order", Value = "GA02_Insert", DbType = DbType.String
             }
         });
         return(num);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #4
0
        /// <summary>
        /// 根据ID删除客户资料数据
        /// </summary>
        /// <returns>结果数据</returns>
        public int RemoveCustomerBaseById(string ID)
        {
            int result = 0;

            try
            {
                string strSql = string.Format(" UPDATE CA01 SET CA01997 = 1 WHERE CA01001 = {0}", ID);
                result = Math.Abs(Provider.ExecuteNonQuery(strSql, 0, null));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }