private void frmHistoryRefer_Load(object sender, EventArgs e) { //-------------- انواع اشیا --------------- cmbObjectType.DisplayMember = "FarsiName"; cmbObjectType.ValueMember = "value"; //cmbObjectType.DataSource = ClassLibrary.Domains.JAutomation.JObjectType.GetData(); if (_Object_Code != 0) { JAObject tmpJAObject = new JAObject(_Object_Code); cmbObjectType.SelectedValue = ClassLibrary.Domains.JAutomation.JObjectType.Letters; Search(); } }
private void Search() { JAObject tmpJAObject = new JAObject(); DataTable dt = new DataTable(); dt = tmpJAObject.FindObjectReferByCode(_Object_Code, new int[] { 0 }); if (dt != null) { jDataTreeView1.dtTree = dt.Copy(); jDataTreeView1.Title = "full_title"; jDataTreeView1.Code = "ID"; jDataTreeView1.ParentCode = "parentcode"; jDataTreeView1.CheckBox = false; jDataTreeView1.CMenu = null; // jDataTreeView1.TreeView. jDataTreeView1.Refresh(); } jDataTreeView1.TreeView.ExpandAll(); }
public ClassLibrary.JNode GetNode(System.Data.DataRow DR) { JARefer R = new JARefer((int)DR["Code"]); if (R.receiver_post_code == JMainFrame.CurrentPostCode && R.status == (int)ClassLibrary.Domains.JAutomation.JReferStatus.Current) { CurrentKartable = JAFolderTypeEnum.Inbox; } else { CurrentKartable = JAFolderTypeEnum.SendItem; } ClassLibrary.JNode node = new JNode((int)DR["Code"], 0); node.ClassName = "Automation.JKartable"; Nodes.hidColumns = "R.Code,ObjectCode,externalcode,action,Objecttype"; /// اکشن باز کردن JAction editAction = new JAction("Open...", "Automation.JKartable.MouseDBClickKartable", new object[] { DR, CurrentKartable }, null); node.MouseDBClickAction = editAction; node.EnterClickAction = editAction; node.Popup.Insert(editAction); // اکشن ارسال به پوشه JAction MoveToFolder = new JAction("SendToFolder...", "Automation.JKartable.MoveToFolder", new object[] { DR }, null); node.Popup.Insert(MoveToFolder); // اکشن حذف از پوشه JAction DeleteToFolder = new JAction("DeleteFromFolder...", "Automation.JKartable.DeleteFromFolder", new object[] { (int)DR["Code"] }, null); node.Popup.Insert(DeleteToFolder); // اکشن برگشت از ارجاع برای ارسال شده ها JARefer jaRefer = (new JARefer((int)DR["Code"])); if (jaRefer.status == 1 && jaRefer.sender_post_code == JMainFrame.CurrentPostCode) { if (JARefers.isReferView((int)DR["Code"]) == false) { JAction ReturnRefer = new JAction("ReturnRefer...", "Automation.JKartable.ReturnRefer", new object[] { DR }, null); node.Popup.Insert(ReturnRefer); } } // ارجا مجدد JAObject O = new JAObject(jaRefer.object_code); { JAction reRefer = new JAction("ReRefer...", O.ClassName + ".reRefer", new object[] { O.ObjectCode, jaRefer.Code }, null); node.Popup.Insert(reRefer); } //JAction SendReferAgain = new JAction("Open...", "Automation.JKartable.SendReferAgain", new object[] { (int)DR["Code"] }, null); //node.Popup.Insert(editAction); node.GetPanel = new JAction("GetPanel...", DR["ClassName"].ToString() + ".GetPanel", new object[] { DR["DynamicClassCode"], DR["ObjectCode"], DR["Code"] }, null); return(node); }