public IEnumerable <AllowedServicesVM> UserServices(int id) { ServiceDAL ser = new ServiceDAL(); var serviceURL = ser.Allowed_service(id); return(serviceURL); }
public void OnFirstClick() { XmlElement sd = ServiceDAL.GetServiceDefinition(this.ContractName, this.PackageName, this.ServiceName); bool isDBHelperService = sd.GetAttribute("Type").ToLower() == "dbhelper"; bool isJavascriptService = sd.GetAttribute("Type").ToLower() == "javascript"; this.Editors = new List <IEditable>(); IEditable editable = null; if (isDBHelperService) { editable = new ServiceUIEditable("Service - " + this.ServiceName, this); this.Editors.Add(editable); } if (isJavascriptService) { editable = new ServiceJSEditable(ServiceName, this); this.Editors.Add(editable); } IEditable xmlEditable = new ServiceXmlEditable("Service - " + this.ServiceName, this); this.Editors.Add(xmlEditable); if (editable == null) { this.CurrentEditor = xmlEditable; } else { this.CurrentEditor = editable; } this.IsFirstClick = false; }
public void OnStartEditing() { Source = ServiceDAL.GetServiceDefinition( ServiceNodeHandler.ContractName, ServiceNodeHandler.PackageName, ServiceNodeHandler.ServiceName); if (Source.SelectSingleNode("Code") != null) { ((JSEditor)Editor).JavaScriptCode = Source.SelectSingleNode("Code").InnerText; ; ((JSEditor)Editor).Unlocked(); } else { MessageBox.Show("找不到 <Code/>,請使用 RAW 編輯加入。"); ((JSEditor)Editor).JavaScriptCode = "//禁用編輯..."; ((JSEditor)Editor).Locked(); } if (ChangeRecovered != null) { ChangeRecovered(this, EventArgs.Empty); } }
public ActionResult Index() { ViewBag.Title = "Dịch Vụ"; List <NewsBOL> lst = ServiceDAL.GetTop(12); return(View(lst)); }
public void Test() { XmlElement definition = ServiceDAL.GetServiceDefinition(this.ContractName, this.PackageName, this.ServiceName); TestServiceForm testForm = new TestServiceForm(this.ContractName, this.PackageName, this.ServiceName, definition); testForm.StartPosition = FormStartPosition.CenterParent; testForm.ShowDialog(); }
public override void Save() { XmlEditor xe = this.Editor as XmlEditor; ServiceDAL.SetDefinition(this.ServiceNodeHandler.ContractName, this.ServiceNodeHandler.PackageName, this.ServiceNodeHandler.ServiceName, xe.Xml); this.OnDataSaved(); }
public void Save() { ServiceDAL.SetDefinition( this.ServiceNodeHandler.ContractName, this.ServiceNodeHandler.PackageName, this.ServiceNodeHandler.ServiceName, GenerateServiceDefinition()); if (ChangeRecovered != null) { ChangeRecovered(this, EventArgs.Empty); } }
public ActionResult Details(int id = 0) { #if DEBUG _log.Debug("id: {0}", id); #endif ViewBag.PageType = __type; NewsBOL model = ServiceDAL.Get(id); if (model == null) { return(RedirectToAction("Index")); } return(View(model)); }
internal XmlElement GetXml() { XmlHelper h = new XmlHelper("<Package/>"); h.SetAttribute(".", "Name", this.Name); foreach (string service in this.Services) { XmlElement def = ServiceDAL.GetRawService(this.Contract.Name, this.Name, service); h.AddElement(".", def); } return(h.GetElement(".")); }
public ActionResult Index(int?id) { #if DEBUG _log.Debug("id: {0}", id); #endif _log.Debug("id: {0}", id); ViewBag.PageType = __type; AllCategoriesModel model = ServiceDAL.GetAllServices(id.HasValue ? id.Value : 0); if (id.HasValue && id.Value > 0) { model.Title = MenuDAL.GetTitle(id.Value); } return(View(model)); }
void TreeView_AfterLabelEdit(object sender, NodeLabelEditEventArgs e) { Node.TreeView.AfterLabelEdit -= new NodeLabelEditEventHandler(TreeView_AfterLabelEdit); Node.TreeView.LabelEdit = false; try { ServiceDAL.Rename(this.ContractName, this.PackageName, this.ServiceName, e.Label); this.ServiceName = e.Label; } catch (Exception ex) { MessageBox.Show(ex.Message, "重新命名失敗", MessageBoxButtons.OK, MessageBoxIcon.Error); e.CancelEdit = true; } }
public void Import() { OpenFileDialog fd = new OpenFileDialog(); DialogResult dr = fd.ShowDialog(); if (dr == DialogResult.OK) { XmlDocument xml = new XmlDocument(); xml.Load(fd.FileName); try { ServiceDAL.SetDefinition(this.ContractName, this.PackageName, this.ServiceName, xml.DocumentElement); } catch (Exception ex) { MessageBox.Show("匯入失敗 : \n" + ex.Message, "錯誤", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
protected override void OnInitialEditor() { XmlElement definition = ServiceDAL.GetServiceDefinition(_serviceNode.ContractName, _serviceNode.PackageName, _serviceNode.ServiceName); //ServiceEditor service = new ServiceEditor(source, this); //base._editorInstance = service; XmlHelper h = new XmlHelper(definition); string action = h.GetText("Action"); _ui = ServiceFactory.CreateServiceUI(action); string serviceFullName = string.Join(".", _serviceNode.PackageName, _serviceNode.ServiceName); _ui.Initialize(serviceFullName, definition); base.OnEditorChanged(_ui.Editor); _ui.DataChanged += new EventHandler(table_DataChanged); _ui.ChangeRecovered += new EventHandler(table_ChangeRecovered); }
public void Export() { XmlElement e = ServiceDAL.GetRawService(this.ContractName, this.PackageName, this.ServiceName); SaveFileDialog sd = new SaveFileDialog(); sd.DefaultExt = "xml"; sd.FileName = this.ServiceName + ".xml"; sd.Filter = "(*.xml)|*.xml"; DialogResult dr = sd.ShowDialog(); if (dr != DialogResult.OK) { return; } string formated = XmlHelper.Format(e.OwnerDocument.OuterXml); XmlHelper h = new XmlHelper(formated); h.WriteTo(sd.FileName); }
public override void Save() { XmlElement definition; try { definition = _ui.GetResult(); } catch (Exception ex) { MessageBox.Show("產生 Service Definition 時發生錯誤 : " + ex.Message, "錯誤", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } try { ServiceDAL.SetDefinition(this._serviceNode.ContractName, this._serviceNode.PackageName, this._serviceNode.ServiceName, definition); } catch (Exception ex) { MessageBox.Show("儲存 Service Definition 時發生錯誤 : " + ex.Message, "錯誤", MessageBoxButtons.OK, MessageBoxIcon.Error); } this.OnInitialEditor(); OnChangeRecovered(); }
public int AddEditService(IService Service, int CompanyID) { return(ServiceDAL.AddEditService(Service, CompanyID)); }
public PersonM Modificar(PersonM item) { IServiceDAL instancia = new ServiceDAL(); return(instancia.Modificar(item)); }
public PersonM Crear(PersonM item) { IServiceDAL instancia = new ServiceDAL(); return(instancia.Crear(item)); }
public void Eliminar(PersonM item) { IServiceDAL instancia = new ServiceDAL(); instancia.Eliminar(item); }
public IEnumerable <PersonM> ObtenerLista() { IServiceDAL instancia = new ServiceDAL(); return(instancia.ObtenerLista()); }
public ServiceService() { serviceDAL = ServiceDAL.getInstance(); }
public IEnumerable <UserServicesVM> userServices(int ID = 0) { ServiceDAL service = new ServiceDAL(); return(service.UserServices(ID)); }
public static IService GetService(int ID) { return(ServiceDAL.GetService(ID)); }
public static int DeleteService(int ImportHaulageId) { return(ServiceDAL.DeleteService(ImportHaulageId)); }
internal void AddService(ServiceEntity sh) { ServiceDAL.AddService(this.Contract.Name, this.Name, sh); LoadServices(); }
public static List <IService> GetServiceWithLine(int ID) { return(ServiceDAL.GetServiceWithLine(ID)); }
public Service AddService(Service service) { ServiceDAL ser = new ServiceDAL(); return(ser.AddService(service)); }
public IEnumerable <Service> ServicesList() { ServiceDAL service = new ServiceDAL(); return(service.ServicesList()); }
public static List <IService> GetService(SearchCriteria searchCriteria, int ID) { return(ServiceDAL.GetService(searchCriteria, ID)); }
public IEnumerable <Service> notAssignServices(int ID = 0) { ServiceDAL service = new ServiceDAL(); return(service.notAssignServices(ID)); }