예제 #1
0
파일: Program.cs 프로젝트: zz110/SharpSCADA
        static void Main(string[] args)
        {
            //Console.WriteLine("Hello World!");
            DAService dataService = new DAService();

            Console.ReadLine();
        }
 public IActionResult Delete(long id)
 {
     try
     {
         DAService dAService = new DAService();
         return(this.OKResponse(dAService.DeleteService(_context, id, User.ToAppUser()) ? "Deleted Successfully" : "Deletion Failed"));
     }
     catch (DataValidationException ex)
     {
         return(this.KnowOperationError(ex.Message));
     }
 }
 public IActionResult Edit([FromBody] ServiceInfo serviceInfo)
 {
     try
     {
         Validator.validateEditService(serviceInfo);
         DAService dAService = new DAService();
         return(this.OKResponse(dAService.EditService(_context, serviceInfo, User.ToAppUser()) ? "Updated Successfully" : "Updation Failed"));
     }
     catch (DataValidationException ex)
     {
         return(this.KnowOperationError(ex.Message));
     }
 }
예제 #4
0
 private void toolStripButton3_Click(object sender, EventArgs e)
 {
     if (tspStartService.Text == "关闭服务")
     {
         service.Dispose();
         service = null;
         tspStartService.Text = "开启服务";
     }
     else
     {
         service = new DAService();
         tspStartService.Text = "关闭服务";
     }
 }
예제 #5
0
        static void Main(string[] args)
        {
            Console.WriteLine("GateWay Is Running");
            Logger.Log.Debug("sdsdsd");
            DAService dataService = new DAService();

            Console.ReadLine();
            //while (true)
            //{
            //    string str = Console.ReadLine();

            //    if (string.IsNullOrWhiteSpace(str))
            //    {
            //        continue;
            //    }

            //    str = str.Replace("吗", "");
            //    str = str.Replace("?", "!");
            //    str = str.Replace("?", "!");

            //    Console.WriteLine(str);
            //}
        }
예제 #6
0
 private void Btn_Test_Click(object sender, EventArgs e)
 {
     da = new DAService();
 }
예제 #7
0
 public FormTagMonitor(DAService service, int groupID)
 {
     InitializeComponent();
     this.service = service;
     this.groupID = groupID;
 }
        public IActionResult GetbyId(long id)
        {
            DAService dAService = new DAService();

            return(this.OK <ServiceInfo>(dAService.GetbyServiceId(_context, id)));
        }
        public IActionResult List()
        {
            DAService dAService = new DAService();

            return(this.OK <List <ServiceListModel> >(dAService.ListService(_context)));
        }
        public IActionResult GetCountrybyId(long id)
        {
            DAService dAService = new DAService();

            return(this.OK <List <ServiceListModel> >(dAService.GetCountrybyId(_context, id)));
        }