/// <summary> /// 更新一条数据 /// </summary> public bool Update(KPS.Model.DeviceInfo model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update PSI_DeViceInfo set "); strSql.Append("DeviceType=@DeviceType"); strSql.Append(" where DeviceID=@DeviceID"); OleDbParameter[] parameters = { new OleDbParameter("@DeviceType", OleDbType.VarChar, 255), new OleDbParameter("@DeviceID", OleDbType.Integer, 4) }; parameters[0].Value = model.DeviceType; parameters[1].Value = model.DeviceID; int rows = DbHelperOleDb.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(KPS.Model.DeviceInfo model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into PSI_DeViceInfo("); strSql.Append("DeviceType)"); strSql.Append(" values ("); strSql.Append("@DeviceType)"); OleDbParameter[] parameters = { new OleDbParameter("@DeviceType", OleDbType.VarChar, 255) }; parameters[0].Value = model.DeviceType; int rows = DbHelperOleDb.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public void GetListData(UIModels.EntryType _type, KPS.Model.DeviceInfo _device) { ThisType = _type; DeviceInfo = _device; _thread = new System.Threading.Thread(new System.Threading.ThreadStart(ThreadStart)); _thread.IsBackground = true; _thread.Start(); }
public void GetListData(UIModels.EntryType _type,KPS.Model.DeviceInfo _device) { ThisType = _type; DeviceInfo = _device; _thread = new System.Threading.Thread(new System.Threading.ThreadStart(ThreadStart)); _thread.IsBackground = true; _thread.Start(); }
/// <summary> /// 主页面加载 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void MainFrm_Load(object sender, EventArgs e) { DeviceCacheInstanceManager devicemanager = new DeviceCacheInstanceManager(); List <KPS.Model.DeviceInfo> listdevicelist = devicemanager.DeviceList; if (listdevicelist != null && listdevicelist.Count > 0) { SelectedDevice = listdevicelist[0]; } MenuShowByUser();//3.根据用户权限显示禁用相关菜单 }
private void CmboxDeviceClass_SelectedIndexChanged(object sender, EventArgs e) { if (CmboxDeviceClass.Items != null && CmboxDeviceClass.Items.Count > 0) { ThisDevice = ((List <KPS.Model.DeviceInfo>)CmboxDeviceClass.Tag)[CmboxDeviceClass.SelectedIndex]; _conditon.DeviceType = ThisDevice.DeviceID; ModelTypeText = string.Format("{0} {1}", ThisDevice.DeviceType, strThisTitleTxt); this.Text = ModelTypeText; StartQueryData(); } }
private void CmboxDeviceClass_SelectedIndexChanged(object sender, EventArgs e) { if (CmboxDeviceClass.Items != null && CmboxDeviceClass.Items.Count > 0) { ThisDevice = ((List<KPS.Model.DeviceInfo>)CmboxDeviceClass.Tag)[CmboxDeviceClass.SelectedIndex]; _conditon.DeviceType = ThisDevice.DeviceID; ModelTypeText = string.Format("{0} {1}", ThisDevice.DeviceType, strThisTitleTxt); this.Text = ModelTypeText; StartQueryData(); } }
private void CmboxDeviceClass_SelectedIndexChanged(object sender, EventArgs e) { if (CmboxDeviceClass.Items != null && CmboxDeviceClass.Items.Count > 0) { ThisDevice = ((List<KPS.Model.DeviceInfo>)CmboxDeviceClass.Tag)[CmboxDeviceClass.SelectedIndex]; ModelTypeText = string.Format("{0} {1}", ThisDevice.DeviceType, strThisTitleTxt); this.Text = ModelTypeText; if (_conditoncontrol != null) { CmboxDeviceClass.Enabled = false; _conditoncontrol.ChangeDeviceType(ThisDevice); } } }
/// <summary> /// 得到一个对象实体 /// </summary> public KPS.Model.DeviceInfo DataRowToModel(DataRow row) { KPS.Model.DeviceInfo model = new KPS.Model.DeviceInfo(); if (row != null) { if (row["DeviceID"] != null && row["DeviceID"].ToString() != "") { model.DeviceID = int.Parse(row["DeviceID"].ToString()); } if (row["DeviceType"] != null) { model.DeviceType = row["DeviceType"].ToString(); } } return model; }
/// <summary> /// 得到一个对象实体 /// </summary> public KPS.Model.DeviceInfo DataRowToModel(DataRow row) { KPS.Model.DeviceInfo model = new KPS.Model.DeviceInfo(); if (row != null) { if (row["DeviceID"] != null && row["DeviceID"].ToString() != "") { model.DeviceID = int.Parse(row["DeviceID"].ToString()); } if (row["DeviceType"] != null) { model.DeviceType = row["DeviceType"].ToString(); } } return(model); }
/// <summary> /// 加载医疗器械类型列表 /// </summary> private void LoadDeviceItems() { DeviceCacheInstanceManager devicemanager = new DeviceCacheInstanceManager(); List <KPS.Model.DeviceInfo> listdevicelist = devicemanager.DeviceList; CmboxDeviceClass.Items.Clear(); if (listdevicelist != null && listdevicelist.Count > 0) { foreach (KPS.Model.DeviceInfo _device in listdevicelist) { CmboxDeviceClass.Items.Add(_device.DeviceType); } CmboxDeviceClass.Tag = listdevicelist; CmboxDeviceClass.SelectedIndex = 0; ThisDevice = listdevicelist[0]; } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(KPS.Model.DeviceInfo model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(KPS.Model.DeviceInfo model) { return(dal.Add(model)); }
public SellRecordsQueryFrm(KPS.Model.DeviceInfo _device) { InitializeComponent(); }
/// <summary> /// 加载医疗器械类型列表 /// </summary> private void LoadDeviceItems() { DeviceCacheInstanceManager devicemanager = new DeviceCacheInstanceManager(); List<KPS.Model.DeviceInfo> listdevicelist = devicemanager.DeviceList; CmboxDeviceClass.Items.Clear(); if (listdevicelist != null && listdevicelist.Count > 0) { foreach (KPS.Model.DeviceInfo _device in listdevicelist) { CmboxDeviceClass.Items.Add(_device.DeviceType); } CmboxDeviceClass.Tag = listdevicelist; CmboxDeviceClass.SelectedIndex = 0; ThisDevice = listdevicelist[0]; } }
/// <summary> /// 更改医疗器械类型 /// </summary> /// <param name="_Device"></param> public virtual void ChangeDeviceType(KPS.Model.DeviceInfo _Device) { }
/// <summary> /// 主页面加载 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void MainFrm_Load(object sender, EventArgs e) { DeviceCacheInstanceManager devicemanager = new DeviceCacheInstanceManager(); List<KPS.Model.DeviceInfo> listdevicelist = devicemanager.DeviceList; if (listdevicelist != null && listdevicelist.Count > 0) { SelectedDevice = listdevicelist[0]; } MenuShowByUser();//3.根据用户权限显示禁用相关菜单 }