コード例 #1
0
ファイル: YnWebService.asmx.cs プロジェクト: wuhuayun/Midea
 public void DeleteDepartment(string ticket, int departmentId, ref string message)
 {
     try
     {
         message = "";
         if (!IsTicketValid(ticket))
         {
             throw new Exception("票证验证失败!");
         }
         YnDepartmentService.GetInstance().Delete(departmentId);
     }
     catch (Exception ex)
     {
         message = ex.Message;
     }
 }
コード例 #2
0
ファイル: YnWebService.asmx.cs プロジェクト: wuhuayun/Midea
        public string GetDepartmentList(string ticket, int parentId, ref string message)
        {
            try
            {
                message = "";
                if (!IsTicketValid(ticket))
                {
                    throw new Exception("票证验证失败!");
                }

                List <YnDepartment> listYnDepartment = YnDepartmentService.GetInstance().GetList("", parentId, "", "");
                return(YnBaseClass2.Helper.ObjectHelper.Serialize(listYnDepartment));
            }
            catch (Exception ex)
            {
                message = ex.Message;
            }
            return(null);
        }
コード例 #3
0
ファイル: YnWebService.asmx.cs プロジェクト: wuhuayun/Midea
        public bool UpdateDepartment(string ticket, string _ynDepartment, ref string message)
        {
            try
            {
                message = "";
                if (!IsTicketValid(ticket))
                {
                    throw new Exception("票证验证失败!");
                }

                YnDepartment ynDepartment = (YnDepartment)YnBaseClass2.Helper.ObjectHelper.Deserialize(typeof(YnDepartment), _ynDepartment);
                //ynUser.lastLoginDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                YnDepartmentService.GetInstance().Update(ynDepartment);
                return(true);
            }
            catch (Exception ex)
            {
                message = ex.Message;
            }
            return(false);
        }