public override int InsertIdentityId(SysAreaDistrictsVO 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 = "@CityId", Value = ParameterHelper.ConvertValue(m.CityId) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@ProvincesId", Value = ParameterHelper.ConvertValue(m.ProvincesId) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@CreateTime", Value = ParameterHelper.ConvertValue(m.CreateTime) }); var result = DbProxyFactory.Instance.Proxy.ExecuteScalar(command); return(int.Parse(result.ToString())); }
public override bool Edit(SysAreaDistrictsVO 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 = "@CityId", Value = ParameterHelper.ConvertValue(m.CityId) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@ProvincesId", Value = ParameterHelper.ConvertValue(m.ProvincesId) }); 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); }
public override string GetOtherConditionByModel(SysAreaDistrictsVO m) { return(""); }
public override string GetOrderByModel(SysAreaDistrictsVO m) { return(""); }