Ejemplo n.º 1
0
 /// <summary>
 /// 检查是否重复
 /// </summary>
 /// <param name="Model.Piece"></param>
 /// <returns></returns>
 public static bool CheckRepeat(Model.Piece model)
 {
     return(PieceService.CheckRepeat(model));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 根据id打印试件
 /// </summary>
 /// <param name="Model.Piece"></param>
 /// <returns></returns>
 public static bool PrintPieceById(ref Model.PiecePrinter model, out string errMsg)
 {
     return(PieceService.PrintPieceById(ref model, out errMsg));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 删除试件
 /// </summary>
 /// <param name="ids"></param>
 /// <returns></returns>
 public static bool DeletePieceByIds(string ids, out string errMsg)
 {
     return(PieceService.DeletePieceByIds(ids, out errMsg));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 根据id修改试件
 /// </summary>
 /// <param name="Model.Piece"></param>
 /// <returns></returns>
 public static bool ModifyPieceById(ref Model.Piece model, out string errMsg)
 {
     return(PieceService.ModifyPieceById(ref model, out errMsg));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 添加试件
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static bool AddPiece(ref Model.Piece model, out string errMsg)
 {
     return(PieceService.AddPiece(ref model, out errMsg));
 }
 public static IEnumerable <Piece> ExtractPiecesFromJson(this string json, PieceService service)
 {
     return(JsonConvert.DeserializeObject <List <Piece> >(json));
 }
 public static IEnumerable <Piece> ExtractPieces(this XDocument document, PieceService service)
 {
     return(document.Element(service.RootNode)?
            .Elements(service.ChildNode)
            .Select(p => Piece.ConvertFromXElement(p)));
 }