public JsonResult getErrorsReport() { repository objRep = new repository(); objRep.GetErrorsReport(); return(null); }
public List <OpenData> Find_Data_From_Db(string name) { repository DBoperation = new repository(); var SqlConn = DBoperation.Connection(); return(DBoperation.Select_All_Data(SqlConn, name)); }
public JsonResult List(Int32 IsActive = 0) { repository rep = new repository(); var result = Json(rep.getActivities(IsActive), JsonRequestBehavior.AllowGet); return(result); }
public JsonResult delete(Employee emp) { repository del = new repository(); del.delete(emp.id); return(null); }
public JsonResult save(Employee data) { repository save = new repository(); save.save(data); return(null); }
public ActionResult showdailyCharts(FilterAndPagerInfo filterInfo) { repository objRep = new repository(); List <FinTracker.Models.Filter> f = filterInfo.Filters != null?filterInfo.Filters.ToList() : new List <FinTracker.Models.Filter>(); User loginUser = Common.GetUser; f.Add(new Models.Filter() { Key = "rcid", Value = loginUser.UserId }); if (Common.GetUser.IsAdmin) { // f.Clear();//he should get all the users of that team. //f.Add(new Models.Filter() { Key = "team", Value = loginUser.AssignedTeam }); filterInfo.Filters = f.ToArray(); } JavaScriptSerializer serializer = new JavaScriptSerializer(); WMDashboardInfoList data = objRep.GetChartData(filterInfo); //build a string to pass on to the UI layer. StringBuilder sb = new StringBuilder(); foreach (WMDashboardInfo info in data.LstByProc) { sb.AppendFormat("['{0}', {1}, {2}]", info.User, info.Target.ToString(), info.TotalTime.ToString()); } ViewBag.Processor = sb.ToString(); ViewBag.ProcessorByAct = serializer.Serialize(data.LstByProcAct); ViewBag.Reviewer = serializer.Serialize(data.LstByRev); ViewBag.ReviewerByAct = serializer.Serialize(data.LstByRevAct); return(PartialView()); }
public JsonResult update(Employee emp) { repository up = new repository(); up.update(emp); return(null); }
public OrderController(repository repository, HookManager hookManager, IHostingEnvironment env) { //this.ctx = ctx; this.repository = repository; this.hookManager = hookManager; this.env = env; }
// var list repo.GetList(); static void Main(string[] args) { Repository repo = new repository(); var data = File.ReadAllText(ConfigurationManager.AppSettings["file"]); //JObject jObject = JObject.Parse(data); //Console.WriteLine("Name : " + jObject["name"]); var personList = JsonConvert.DeserializeObject <List <Person> >(data); // personList.RemoveAt(1); string dataToSave = JsonConvert.SerializeObject(personList); File.WriteAllText((ConfigurationManager.AppSettings["file"]), dataToSave); repo.Add(new Person { LastName = "Zyhu", Name = "Ahdi", listOfObjects = new List <string> { "1", "2", "abc" } });;; string saveNewPerson = JsonConvert.SerializeObject(repo); File.WriteAllText(ConfigurationManager.AppSettings["file"], saveNewPerson); Console.Read(); }
public JsonResult delete(WorkMaint wm) { repository del = new repository(); del.delete(wm.WorkItemId); return(null); }
public AdminMenuViewComponent( repository repository, IHttpContextAccessor httpContextAccessor) { this.repository = repository; this.httpContextAccessor = httpContextAccessor; }
/// <summary> /// The actual Work to be done. /// </summary> protected override void Execute() { repository repository = null; switch (Request.WellKnownModificationType) { case Core.Enums.WellKnownModificationType.Add: repository = Util.ConvertToRepository(Request.RepositoryModel); RepositoryRepository.Add(repository); RepositoryRepository.Save(); break; case Core.Enums.WellKnownModificationType.Edit: repository = RepositoryRepository.GetRepositoryToEdit(Request.RepositoryModel.Id); repository = Util.ConvertToRepository(repository, Request.RepositoryModel); RepositoryRepository.Edit(repository); RepositoryRepository.Save(); break; default: break; } Response = new ResponseModel() { IsOperationSuccess = true }; }
public ActionResult DeleteConfirmed(int id) { repository repository = db.repositories.Find(id); db.repositories.Remove(repository); db.SaveChanges(); return(RedirectToAction("Index")); }
public JsonResult getList() { UserViewModel wms = new UserViewModel(); repository getdata = new repository(); wms = getdata.GetUsers(); return(Json(wms, JsonRequestBehavior.AllowGet)); }
public static RepositoryModel ConvertToRepositoryModel(repository repository) { return(new RepositoryModel() { Id = repository.Id, RepositoryName = repository.RepositoryName, }); }
public JsonResult getList() { var emp = new List <Employee>(); repository getdata = new repository(); emp = getdata.getList(); return(Json(emp, JsonRequestBehavior.AllowGet)); }
public JsonResult getPending(FilterAndPagerInfo objFilterInfo) { WMViewModel wms = new WMViewModel("", false); repository getdata = new repository(); wms = getdata.getPendingList(objFilterInfo); return(Json(wms, JsonRequestBehavior.AllowGet)); }
public JsonResult getList(String team = "") { WMViewModel wms = new WMViewModel("", false); repository getdata = new repository(); getdata.Team = team; wms = getdata.getList(); return(Json(wms, JsonRequestBehavior.AllowGet)); }
public ActionResult Edit([Bind(Include = "repo_id,repo_address")] repository repository) { if (ModelState.IsValid) { db.Entry(repository).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(repository)); }
public void ImportToDb(List <OpenData> openDatas) { repository DBoperation = new repository(); var SqlConn = DBoperation.Connection(); openDatas.ForEach(new_items => { DBoperation.Insert_Data(SqlConn, new_items); }); }
public ActionResult Create([Bind(Include = "repo_id,repo_address")] repository repository) { if (ModelState.IsValid) { db.repositories.Add(repository); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(repository)); }
public MellatService(repository repository, IHttpContextAccessor httpContextAccessor) { this.repository = repository; this.httpContextAccessor = httpContextAccessor; Mellat = new Mellat { terminalId = Int64.Parse(this.repository.GetSetting("mellatTerminalId")), userName = this.repository.GetSetting("mellatUserName"), password = this.repository.GetSetting("mellatPassword") }; }
// GET: repositories/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } repository repository = db.repositories.Find(id); if (repository == null) { return(HttpNotFound()); } return(View(repository)); }
/// <summary> /// Will execute the commands needed to create a repository on the SVN server /// </summary> /// <param name="r">Object with the repository name.</param> /// <returns>True if creation was successful, False if there was a failure.</returns> static public bool CreateRepository(repository r) { ManagementClass repoClass = new ManagementClass("root\\VisualSVN", "VisualSVN_Repository", null); // Obtain in-parameters for the method ManagementBaseObject inParams = repoClass.GetMethodParameters("Create"); // Add the input parameters. inParams["Name"] = r.name; // Execute the method and obtain the return values. ManagementBaseObject outParams = repoClass.InvokeMethod("Create", inParams, null); return(true); }
public void AddUser() { var commands = new repository(); Console.WriteLine("Enter mail, password and ID"); // считываем данные пользователя string mail = Console.ReadLine(); string password = Console.ReadLine(); int iD = int.Parse(Console.ReadLine()); commands.Add(new User { Password = password, Mail = mail, ID = iD }); }
public void AddBook() { var commands = new repository(); Console.WriteLine("Enter Name and year"); // считываем данные книги string name = Console.ReadLine(); //Author author = Console.ReadLine(); int year = int.Parse(Console.ReadLine()); commands.Add(new Book { name = name, year = year }); }
public void AddAuthor() { var commands = new repository(); Console.WriteLine("Enter Name, Surname, Middle Nane and year born"); // считываем данные автора string name = Console.ReadLine(); string surname = Console.ReadLine(); string middleName = Console.ReadLine(); int born = int.Parse(Console.ReadLine()); commands.Add(new Author { name = name, surname = surname, middleName = middleName, born = born }); }
public ActionResult generateFile(WMReportInputs input) { try { Response.Cookies.Remove("fileDownload"); repository objRep = new repository(); WMRPTErrViewModel rep = objRep.GetHistory(input); XLExport objExp = new XLExport(rep); string flName = objExp.ExcelExport(); return(Json(new { success = true, fileName = flName }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { throw ex; } }
public JsonResult GetReviewers() { repository getdata = new repository(); ReviewerMgmt rmgmt = new ReviewerMgmt(); UserViewModel uModel = new UserViewModel(); uModel = getdata.GetUsers(); rmgmt = getdata.GetReviewers(); //remove the users who already have the reviewer role foreach (var p in rmgmt.lst) { if (uModel.lst.Exists(s => s.UserId == p.ReviewerId)) { uModel.lst.Remove(uModel.lst.Single(s => s.UserId == p.ReviewerId)); } } rmgmt.AvailableUsers = uModel.lst; return(Json(rmgmt, JsonRequestBehavior.AllowGet)); }
private void Awake() { repositoryNow = this; progetilesList = new List<GameObject>(); weaponsList = new List<GameObject>(); boxsList = new List<GameObject>(); enemiesList = new List<GameObject>(); audioSourceList = new List<GameObject>(); InstantiateObjs(baseBoxs.gameObject, typesObjs.box, 50); InstantiateObjs(audioSourceBase.gameObject, typesObjs.audioSoucer, 50); InstantiateObjs(enemieBase.gameObject, typesObjs.enemies, 50); for(int i = 0; i < allWeapons.Count; i++) { GameObject obj = allWeapons[i].gameObject; int n = 20; if (allWeapons[i].GetWeaponInfs().IsDual()) n *= 2; InstantiateObjs(obj, typesObjs.weapon, n); } }