public ActionResult AddAppointment(AddAppointmentDataInput ti) { if (this.CreateService <IAppointmentDataService>().Add(ti).Id != "") { return(this.SuccessMsg()); } return(this.SuccessMsg("失败!")); }
public ActionResult AddAppointmentTran(AddAppointmentDataInput aapp) { string code = WebHelper.GetSession <string>(App_VerifyCodeKey); WebHelper.RemoveSession(App_VerifyCodeKey); if (code.IsNullOrEmpty() || code.ToLower() != aapp.VCode.ToLower()) { return(null); } AppointmentData appd = this.CreateService <IAppointmentDataService>().Add(aapp); return(this.JsonContent(appd)); }
public AppointmentData Add(AddAppointmentDataInput input) { AppointmentData entity = new AppointmentData(); string _Code = (this.DbContext.Query <AppointmentData>().Where(a => a.BusinessID == input.BusinessID).Select(a => AggregateFunctions.Count()).First() + 1).ToString(); while (_Code.Length < 4) { _Code = "0" + _Code; } entity.Id = IdHelper.CreateGuid(); entity.CreateTime = DateTime.Now; entity.AppointmentDate = input.AppointmentDate; entity.BusinessID = input.BusinessID; entity.FileID = input.FileID; entity.MALU_Code = input.Code + _Code; entity.MamberID = input.MamberID; entity.State = input.State; return(this.DbContext.Insert(entity)); }