public AppConfigs.OperResult DelTrainBase(string id, int type = 0) { if (string.IsNullOrEmpty(id)) { throw new HttpRequestException("参数错误"); } AppConfigs.OperResult i = AppConfigs.OperResult.failUnknown; TrainbaseRequestType t = (TrainbaseRequestType)type; switch (t) { case TrainbaseRequestType.period: i = this.trainBaseSv.Del <Base_Period>(id); break; case TrainbaseRequestType.grade: i = this.trainBaseSv.Del <Base_Grade>(id); break; case TrainbaseRequestType.subject: i = this.trainBaseSv.Del <Base_Subject>(id); break; case TrainbaseRequestType.genre: i = this.trainBaseSv.Del <Base_Genre>(id); break; } return(i); }
public ActionResult _trainlist(TrainbaseRequestType t, int pg, bool asc = true) { var mdl = trainBaseSv.OrderList((int)t, pg, asc); return(PartialView(new BaseDataViewModel() { Datas = mdl, IsAsc = asc, Type = t })); }