/// <summary> /// 修改数据 /// </summary> /// <param name="Item">model</param> /// <returns></returns> public static bool Update(Ini_SystemLodad Item) { bool Flag = false; try { PublicFun.IniFile Ini = new PublicFun.IniFile(WSV.Model.FilePath.Config); if (Ini.ExistIniFile()) { Ini.IniWriteValue("systemload", "Displaytype", Item.Displaytype); Ini.IniWriteValue("systemload", "Tranimage", Item.Tranimage); Ini.IniWriteValue("systemload", "Trantime", Item.Trantime); } Flag = true; } catch (Exception ex) { throw ex; } return Flag; }
/// <summary> /// 修改数据 /// </summary> /// <param name="Item">model</param> /// <returns></returns> public static bool Update(C_Infrared Item) { bool Flag = false; try { PublicFun.IniFile Ini = new PublicFun.IniFile(WSV.Model.FilePath.Config); if (Ini.ExistIniFile()) { Ini.IniWriteValue("Infrared", "Enable", Item.Enable); Ini.IniWriteValue("Infrared", "Infrared1", Item.Infrared1); Ini.IniWriteValue("Infrared", "Infrared2", Item.Infrared2); } Flag = true; } catch (Exception ex) { throw ex; } return Flag; }
/// <summary> /// 修改数据 /// </summary> /// <param name="Item">model</param> /// <returns></returns> public static bool Update(C_DataFormat Item) { bool Flag = false; try { PublicFun.IniFile Ini = new PublicFun.IniFile(WSV.Model.FilePath.Config); if (Ini.ExistIniFile()) { Ini.IniWriteValue("DataFormat", "MoneyMode", Item.MoneyMode); Ini.IniWriteValue("DataFormat", "EndNetMode", Item.EndNetMode); Ini.IniWriteValue("DataFormat", "CodeRule", Item.CodeRule); Ini.IniWriteValue("DataFormat", "CodeWay", Item.CodeWay); } Flag = true; } catch (Exception ex) { throw ex; } return Flag; }
/// <summary> /// 修改数据 /// </summary> /// <param name="Item">model</param> /// <returns></returns> public static bool Update(C_RoadSluice Item) { bool Flag = false; try { PublicFun.IniFile Ini = new PublicFun.IniFile(WSV.Model.FilePath.Config); if (Ini.ExistIniFile()) { Ini.IniWriteValue("RoadSluice", "Enable", Item.Enable); Ini.IniWriteValue("RoadSluice", "RoadSluice1", Item.RoadSluice1); Ini.IniWriteValue("RoadSluice", "RoadSluice2", Item.RoadSluice2); Ini.IniWriteValue("RoadSluice", "WorkMode1", Item.WorkMode1); Ini.IniWriteValue("RoadSluice", "WorkMode2", Item.WorkMode2); } Flag = true; } catch (Exception ex) { throw ex; } return Flag; }
/// <summary> /// 修改数据 /// </summary> /// <param name="Item">model</param> /// <returns></returns> public static bool Update(C_IdCard Item) { bool Flag = false; try { PublicFun.IniFile Ini = new PublicFun.IniFile(WSV.Model.FilePath.Config); if (Ini.ExistIniFile()) { Ini.IniWriteValue("IdCard", "Enable", Item.Enable); Ini.IniWriteValue("IdCard", "Serial", Item.Serial); Ini.IniWriteValue("IdCard", "BaudRate", Item.BaudRate); Ini.IniWriteValue("IdCard", "WeightType", Item.WeightType); Ini.IniWriteValue("IdCard", "CardType", Item.CardType); } Flag = true; } catch (Exception ex) { throw ex; } return Flag; }
/// <summary> /// 修改数据 /// </summary> /// <param name="Item">model</param> /// <returns></returns> public static bool Update(C_Meter Item) { bool Flag = false; try { PublicFun.IniFile Ini = new PublicFun.IniFile(WSV.Model.FilePath.Config); if (Ini.ExistIniFile()) { Ini.IniWriteValue("Meter", "Serial", Item.Serial); Ini.IniWriteValue("Meter", "MeterType", Item.MeterType); Ini.IniWriteValue("Meter", "BaudRate", Item.BaudRate); Ini.IniWriteValue("Meter", "Unit", Item.Unit); Ini.IniWriteValue("Meter", "DetectStart", Item.DetectStart); Ini.IniWriteValue("Meter", "FullBalance", Item.FullBalance); Ini.IniWriteValue("Meter", "Digit", Item.Digit); } Flag = true; } catch (Exception ex) { throw ex; } return Flag; }
/// <summary> /// 设为本机 /// </summary> /// <param name="Item">model</param> /// <returns></returns> public static bool SetLocal(DC_LoadoMeter Item) { bool Flag = false; try { PublicFun.IniFile Ini = new PublicFun.IniFile(WSV.Model.FilePath.Config); if (Ini.ExistIniFile()) { Ini.IniWriteValue("LoadoMeter", "TableNum", Item.TableNum); } Flag = true; } catch (Exception ex) { throw ex; } return Flag; }