/// <summary> /// �Ľ������ /// </summary> public void UpdateObject() { if (catygory == "") { return; } //��ȡ������� RtfAttachFiles obj = FocusedObject; if (obj == null) { return; } if (obj.ParentID== "0") { return; } //���������һ������ RtfAttachFiles objCopy = new RtfAttachFiles(); DataConverter.CopyTo<RtfAttachFiles>(obj, objCopy); //ִ���IJ��� using (FrmRtfAttachFilesDialogTR dlg = new FrmRtfAttachFilesDialogTR()) { dlg.Object = objCopy; //���� if (dlg.ShowDialog() != DialogResult.OK) { return; } } //Common.Services.BaseService.Update<RtfAttachFiles>(objCopy); RefreshData(); ////�ø������½������ DataConverter.CopyTo<RtfAttachFiles>(objCopy, obj); ////ˢ�±�� //treeList1.RefreshDataSource(); }
/// <summary> /// �Ľ������ /// </summary> public void UpdateObject() { //��ȡ������� RtfAttachFiles obj = FocusedObject; if (obj == null) { return; } //���������һ������ RtfAttachFiles objCopy = new RtfAttachFiles(); DataConverter.CopyTo<RtfAttachFiles>(obj, objCopy); //ִ���IJ��� using (FrmRtfAttachFilesDialog dlg = new FrmRtfAttachFilesDialog()) { dlg.Object = objCopy; //���� if (dlg.ShowDialog() != DialogResult.OK) { return; } } //�ø������½������ DataConverter.CopyTo<RtfAttachFiles>(objCopy, obj); //ˢ�±�� gridControl.RefreshDataSource(); }
/// <summary> /// ��Ӷ��� /// </summary> public void AddObject() { //�����������Ƿ��Ѿ����� //if (ObjectList == null) //{ // return; //} //�½����� if (catygory == "") { return; } RtfAttachFiles obj = new RtfAttachFiles(); obj.C_UID = catygory; obj.CreateDate = (DateTime)Services.BaseService.GetObject("SelectSysData", null); //ִ����Ӳ��� using (FrmRtfAttachFilesDialogTR dlg = new FrmRtfAttachFilesDialogTR()) { string parentid = "0"; if (treeList1.FocusedNode!=null&&treeList1.FocusedNode.GetValue("ParentID").ToString()!="0") { MessageBox.Show("ֻ����һ��Ŀ¼����Ӹ���"); return; } else { parentid = FocusedObject.UID; } dlg.IsCreate = true; //�����½���־ dlg.Object = obj; dlg.ParentID = parentid; if (dlg.ShowDialog() != DialogResult.OK) { return; } } //Common.Services.BaseService.Create<RtfAttachFiles>(obj); RefreshData(); ////���¶�����뵽������ //ObjectList.Add(obj); ////ˢ�±���������ж�λ���¶����ϡ� //treeList1.RefreshDataSource(); //Set_Focus(obj.UID); }
/// <summary> /// ��Ӷ��� /// </summary> public void AddObject() { //�����������Ƿ��Ѿ����� if (ObjectList == null) { return; } //�½����� RtfAttachFiles obj = new RtfAttachFiles(); obj.C_UID = catygory; obj.CreateDate = (DateTime)Services.BaseService.GetObject("SelectSysData", null); //ִ����Ӳ��� using (FrmRtfAttachFilesDialog dlg = new FrmRtfAttachFilesDialog()) { dlg.IsCreate = true; //�����½���־ dlg.Object = obj; if (dlg.ShowDialog() != DialogResult.OK) { return; } } //���¶�����뵽������ ObjectList.Add(obj); //ˢ�±���������ж�λ���¶����ϡ� gridControl.RefreshDataSource(); GridHelper.FocuseRow(this.gridView, obj); }