コード例 #1
0
        public override bool Edit(SysAreaProvincesVO m)
        {
            CodeCommand command = new CodeCommand();

            command.CommandText = EDIT;

            command.Parameters.Add(new SqlParameter()
            {
                ParameterName = "@Id", Value = ParameterHelper.ConvertValue(m.Id)
            });
            command.Parameters.Add(new SqlParameter()
            {
                ParameterName = "@Name", Value = ParameterHelper.ConvertValue(m.Name)
            });
            command.Parameters.Add(new SqlParameter()
            {
                ParameterName = "@CreateTime", Value = ParameterHelper.ConvertValue(m.CreateTime)
            });


            int result = DbProxyFactory.Instance.Proxy.ExecuteNonQuery(command);

            if (result >= 1)
            {
                return(true);
            }

            return(false);
        }
コード例 #2
0
        public override int InsertIdentityId(SysAreaProvincesVO m)
        {
            CodeCommand command = new CodeCommand();

            command.CommandText = INSERT + "; select @@Identity";

            command.Parameters.Add(new SqlParameter()
            {
                ParameterName = "@Id", Value = ParameterHelper.ConvertValue(m.Id)
            });
            command.Parameters.Add(new SqlParameter()
            {
                ParameterName = "@Name", Value = ParameterHelper.ConvertValue(m.Name)
            });
            command.Parameters.Add(new SqlParameter()
            {
                ParameterName = "@CreateTime", Value = ParameterHelper.ConvertValue(m.CreateTime)
            });


            var result = DbProxyFactory.Instance.Proxy.ExecuteScalar(command);

            return(int.Parse(result.ToString()));
        }
コード例 #3
0
 public override string GetOtherConditionByModel(SysAreaProvincesVO m)
 {
     return("");
 }
コード例 #4
0
 public override string GetOrderByModel(SysAreaProvincesVO m)
 {
     return("");
 }