/// <summary> /// ویرایش اطلاعات شزکت اقماری /// </summary> /// <returns></returns> public bool Update() { if (Find(Code)) { JASubsidiariesTable JST = new JASubsidiariesTable(); JST.SetValueProperty(this); //JST. Nodes.Refresh(GetNode()); return(JST.Update()); } return(false); }
/// <summary> /// حذف شرکت اقماری از بانک اطلاعاتی /// </summary> /// <returns></returns> public bool Delete(int pCode) { if (Find(pCode)) { if (JMessages.Message(JLanguages._Text("Do you want delete this Item?"), JLanguages._Text("Question"), JMessageType.Question) != System.Windows.Forms.DialogResult.Yes) { return(false); } GetData(pCode); JASubsidiariesTable JST = new JASubsidiariesTable(); JST.SetValueProperty(this); if (JST.Delete()) { Nodes.Delete(GetNode()); return(true); } } return(false); }
// Insert , Update , Delete #region BaseFunctions /// <summary> /// درج شرکت اقماری جدید در بانک اطلاعاتی /// </summary> /// <returns>بر می گرداند True در صورت درج صحیح مقدار</returns> public bool Insert() { if (Find(Code) || Find(Name)) { return(false); } JASubsidiariesTable JST = new JASubsidiariesTable(); JST.SetValueProperty(this); int mCode = JST.Insert(); if (mCode != 0) { Code = mCode; Nodes.Insert(GetNode()); return(true); } return(false); }