You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.2 KiB
C#
40 lines
1.2 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using Mesnac.Action.ChemicalWeighing.LjMaterial;
|
|
|
|
namespace Mesnac.Action.ChemicalWeighing.LjTanNum
|
|
{
|
|
public class TankNumCodingDbHelp:DBHelp
|
|
{
|
|
|
|
|
|
|
|
public static DataTable GetById(int id)
|
|
{
|
|
string sql = "select Id, Code, DayBinName, MTypeId,MTypeName, MId, MName, Remark from lj_day_material where Id="+id;
|
|
DataTable dt = GetTable(sql);
|
|
return dt;
|
|
}
|
|
|
|
public static int Update(TankNumCodingView view)
|
|
{
|
|
string sql = @"update [lj_day_material] set
|
|
[MTypeId] = @MTypeId,
|
|
[MTypeName] = @MTypeName,
|
|
[MId] = @MId,
|
|
[MName] = @MName where id=@id";
|
|
|
|
IDictionary<string,object> dic = GetDefault();
|
|
dic.Add("@id",view.Id);
|
|
dic.Add("@MTypeId",view.MTypeId);
|
|
dic.Add("@MTypeName",view.MTypeName);
|
|
dic.Add("@MId",view.MId);
|
|
dic.Add("@MName",view.MName);
|
|
|
|
|
|
ExecuteNonQuery(sql, dic);
|
|
return 1;
|
|
}
|
|
}
|
|
} |