示例#1
0
        public ActionResult GetServiceByID(int id)
        {
            BO_Service obj = new BussinessObject.BO_Service();

            obj = BL_Service.GetServiceByID(id);
            return(Json(obj, JsonRequestBehavior.AllowGet));
        }
示例#2
0
 public static BO_Service GetServiceByID(int id)
 {
     using (AprosysAccountingEntities db = new AprosysAccountingEntities())
     {
         var        obj         = db.Acc_COA.Where(x => x.PId == 101 && x.HeadAccount == 5 && x.CoaId == id).FirstOrDefault();
         BO_Service obj_Service = new BussinessObject.BO_Service();
         obj_Service.id   = id;
         obj_Service.name = obj.TreeName;
         obj_Service.code = obj.ServiceCode;
         obj_Service.cost = obj.Cost ?? 0;
         return(obj_Service);
     }
 }