示例#1
0
 /// <summary>
 /// 周状态报表
 /// </summary>
 /// <param name="year"></param>
 /// <param name="month"></param>
 /// <param name="week"></param>
 /// <returns></returns>
 public static DataSet GetWeekStatueReport(int year, int month, int week)
 {
     try
     {
         if (WSInfo.WsURL.Trim() == "")
         {
             throw new Exception("服务地址配置错误!");
         }
         else
         {
             string   WsFullURL = WSInfo.WsURL + "ReportService.asmx";
             object[] args      = new object[4];
             args[0] = year;
             args[1] = month;
             args[2] = week;
             args[3] = WSInfo.SPassword;
             object oResult = UfidaPMSService.InvokeWebService(WsFullURL, "GetWeekStatueReport", args);
             return(oResult as DataSet);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#2
0
 /// <summary>
 /// 人天报表
 /// </summary>
 /// <returns></returns>
 public static DataTable GetPeopleDayReport()
 {
     try
     {
         if (WSInfo.WsURL.Trim() == "")
         {
             throw new Exception("服务地址配置错误!");
         }
         else
         {
             string   WsFullURL = WSInfo.WsURL + "ReportService.asmx";
             object[] args      = new object[1];
             args[0] = WSInfo.SPassword;
             object oResult = UfidaPMSService.InvokeWebService(WsFullURL, "GetPeopleDayReport", args);
             return((oResult as DataSet).Tables[0]);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#3
0
 /// <summary>
 /// 删除一条数据
 /// </summary>
 public static bool Delete(int userid)
 {
     try
     {
         if (WSInfo.WsURL.Trim() == "")
         {
             throw new Exception("服务地址配置错误!");
         }
         else
         {
             string   WsFullURL = WSInfo.WsURL + "UserService.asmx";
             object[] args      = new object[2];
             args[0] = userid;
             args[1] = WSInfo.SPassword;
             object oResult = UfidaPMSService.InvokeWebService(WsFullURL, "Delete", args);
             return((bool)oResult);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#4
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public static bool Update(FYSOFT.HMIS.Models.User model)
 {
     try
     {
         if (WSInfo.WsURL.Trim() == "")
         {
             throw new Exception("服务地址配置错误!");
         }
         else
         {
             string   WsFullURL = WSInfo.WsURL + "UserService.asmx";
             string[] args      = new string[2];
             args[0] = CommonHelper.Serialize(model);
             args[1] = WSInfo.SPassword;
             object oResult = UfidaPMSService.InvokeWebService(WsFullURL, "Update", args);
             return((bool)oResult);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#5
0
 /// <summary>
 /// 检查用名是否存在
 /// </summary>
 public static bool CheckUserName(string UserName)
 {
     try
     {
         if (WSInfo.WsURL.Trim() == "")
         {
             throw new Exception("服务地址配置错误!");
         }
         else
         {
             string   WsFullURL = WSInfo.WsURL + "UserService.asmx";
             string[] args      = new string[2];
             args[0] = UserName;
             args[1] = WSInfo.SPassword;
             object oResult = UfidaPMSService.InvokeWebService(WsFullURL, "CheckUserName", args);
             return((bool)oResult);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#6
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 public static FYSOFT.HMIS.Models.User GetModel(int userid)
 {
     try
     {
         if (WSInfo.WsURL.Trim() == "")
         {
             throw new Exception("服务地址配置错误!");
         }
         else
         {
             string   WsFullURL = WSInfo.WsURL + "UserService.asmx";
             object[] args      = new object[2];
             args[0] = userid;
             args[1] = WSInfo.SPassword;
             object oResult = UfidaPMSService.InvokeWebService(WsFullURL, "GetModel", args);
             return(CommonHelper.DeSerialize(typeof(FYSOFT.HMIS.Models.User), oResult.ToString()) as FYSOFT.HMIS.Models.User);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }