/// <summary> /// 编辑当前选中的 Load index 记录 /// </summary> /// <param name="roomType"></param> private void DoEditIndex(RoomLoadIndex item) { frmLoadIndexAddIndex f = new frmLoadIndexAddIndex(item); if (f.ShowDialog() == DialogResult.OK) { RoomLoadIndex newItem = f.LoadIndexItem; if (bll.UpdateLoadIndex(newItem, out errMsg) == 1) { JCMsg.ShowInfoOK(JCMsg.INFO_SUCCESS); BindLoadIndexList(jccmbLocation.Text.Trim()); } else { JCMsg.ShowErrorOK(errMsg); } } }
/// <summary> /// 增加新的 Load index 记录 /// </summary> private void DoAddIndex(string city) { frmLoadIndexAddIndex f = new frmLoadIndexAddIndex(city); if (f.ShowDialog() == DialogResult.OK) { RoomLoadIndex newItem = f.LoadIndexItem; int index = bll.AddLoadIndex(newItem, out errMsg); if (index == 1) { JCMsg.ShowInfoOK(JCMsg.INFO_SUCCESS); BindLoadIndexList(jccmbLocation.Text.Trim()); } else if (index == 0) { JCMsg.ShowErrorOK(Msg.ROOM_TYPE_IS_EXIST()); } else { JCMsg.ShowErrorOK(errMsg); } } }