/// <summary> /// 如果傳入 DataSet 型別 , 代表新增 /// </summary> /// <param name="ds"></param> public FormEditTip(MiniTipsDataSet ds) { _ds = ds; _tipsRow = _ds.Tips.NewTipsRow(); _tipsRow.TipId = (UInt64)DateTime.Now.Ticks; _tipsRow.Subject = ""; _tipsRow.Description = ""; _tipsRow.Url = "http://"; _tipsRow.CreateDate = DateTime.Now; _tipsRow.LastNotifiedDate = _tipsRow.CreateDate; _ds.Tips.Rows.Add(_tipsRow); InitializeComponent(); }
/// <summary> /// 如果傳入 DataRow , 代表編輯 /// </summary> /// <param name="row"></param> public FormEditTip(MiniTipsDataSet.TipsRow row) { _tipsRow = row; this._ds = (MiniTipsDataSet)row.Table.DataSet; InitializeComponent(); }