public JsonResult GetCatBankById([DataSourceRequest] DataSourceRequest request, Cat_Bank catbank) { Cat_BankServices service = new Cat_BankServices(); var CatBank = service.GetByIdCatBanks(catbank.Id); return(Json(CatBank)); }
public JsonResult UpdateCatBank(HttpRequestMessage request, Cat_Bank bank) { var model = new Cat_Bank(); model.Id = bank.Id; model.BankName = bank.BankName; model.BankCode = bank.BankCode; model.Notes = bank.Notes; model.UserCreate = bank.UserCreate; model.UserLockID = bank.UserLockID; model.UserUpdate = bank.UserUpdate; model.DateCreate = bank.DateCreate; model.DateLock = bank.DateLock; model.DateUpdate = bank.DateUpdate; model.IPCreate = bank.IPCreate; model.IPUpdate = bank.IPUpdate; model.IsDelete = bank.IsDelete; model.ServerCreate = bank.ServerCreate; model.ServerUpdate = bank.ServerUpdate; Cat_BankServices service = new Cat_BankServices(); var result = service.UpdateCatBank(model); if (result == false) { model = null; } return(Json(model)); }
public ActionResult GetCatBanksTest() { Cat_BankServices service = new Cat_BankServices(); var list = service.GetCatBanks(); return(Json(list, JsonRequestBehavior.AllowGet)); }
public JsonResult UpdateCatBank(HttpRequestMessage request, Cat_Bank bank) { var model = new Cat_Bank(); model.Id = bank.Id; model.BankName = bank.BankName; model.BankCode = bank.BankCode; model.Notes = bank.Notes; model.UserCreate = bank.UserCreate; model.UserLockID = bank.UserLockID; model.UserUpdate = bank.UserUpdate; model.DateCreate = bank.DateCreate; model.DateLock = bank.DateLock; model.DateUpdate = bank.DateUpdate; model.IPCreate = bank.IPCreate; model.IPUpdate = bank.IPUpdate; model.IsDelete = bank.IsDelete; model.ServerCreate = bank.ServerCreate; model.ServerUpdate = bank.ServerUpdate; Cat_BankServices service = new Cat_BankServices(); var result = service.UpdateCatBank(model); if (result == false) model = null; return Json(model); }
public ActionResult GetCatBanks([DataSourceRequest] DataSourceRequest request) { Cat_BankServices service = new Cat_BankServices(); var list = service.GetCatBanks(); return(Json(list.ToDataSourceResult(request))); }
public void NUnit_Domain_GetCatBanks(ListQueryModel model) { Cat_BankServices service = new Cat_BankServices(); string status = string.Empty; int count = service.GetAllUseEntity<Cat_Bank>(ref status).Count(); //NUnit.Framework.Assert.AreNotEqual(0, count); Console.Write("Total Record: " + count); }
public JsonResult DeleteCatBank(HttpRequestMessage request, Cat_Bank bank) { Cat_Bank catBank = new Cat_Bank(); Cat_BankServices service = new Cat_BankServices(); var result = service.DeleteCatBank(bank.Id); if (result == false) catBank = null; return Json(catBank); }
public void NUnit_Domain_GetByIdCatBanks() { Cat_BankServices service = new Cat_BankServices(); var bank = new Cat_Bank { Id = 22 }; var status = string.Empty; var result = service.GetById<Cat_Bank>(bank.Id,ref status); NUnit.Framework.Assert.IsNotNull(result); Console.Write("SearchResult: " + result.Id + " | " + result.BankName + " | " + result.BankCode + " | " + result.Notes); }
public void NUnit_Domain_GetCatBanks(ListQueryModel model) { Cat_BankServices service = new Cat_BankServices(); string status = string.Empty; int count = service.GetAllUseEntity <Cat_Bank>(ref status).Count(); //NUnit.Framework.Assert.AreNotEqual(0, count); Console.Write("Total Record: " + count); }
public JsonResult AddCatBank(HttpRequestMessage request, Cat_Bank bank) { var model = new Cat_Bank(); model.Id = bank.Id; model.BankName = bank.BankName; model.BankCode = bank.BankCode; model.Notes = bank.Notes; Cat_BankServices service = new Cat_BankServices(); var result = service.AddCatBanks(model); if (result == false) model = null; return Json(model); }
public void NUnit_Domain_GetByIdCatBanks() { Cat_BankServices service = new Cat_BankServices(); var bank = new Cat_Bank { Id = 22 }; var status = string.Empty; var result = service.GetById <Cat_Bank>(bank.Id, ref status); NUnit.Framework.Assert.IsNotNull(result); Console.Write("SearchResult: " + result.Id + " | " + result.BankName + " | " + result.BankCode + " | " + result.Notes); }
public JsonResult DeleteCatBank(HttpRequestMessage request, Cat_Bank bank) { Cat_Bank catBank = new Cat_Bank(); Cat_BankServices service = new Cat_BankServices(); var result = service.DeleteCatBank(bank.Id); if (result == false) { catBank = null; } return(Json(catBank)); }
public void NUnit_Domain_UpdateCatBank() { Cat_BankServices service = new Cat_BankServices(); var bank = new Cat_Bank { Id = 12, BankName = "ABCDomain12", BankCode = "BC-12", Notes = "NUnit Test12" }; //NUnit.Framework.Assert.IsTrue(result); if (service.Edit(bank) == ActionStatus.EditSucceed.ToString()) { Console.WriteLine("==>>> Result After Update: " + bank.Id + " | " + bank.BankName + " | " + bank.BankCode + " | " + bank.Notes); } }
public JsonResult AddCatBank(HttpRequestMessage request, Cat_Bank bank) { var model = new Cat_Bank(); model.Id = bank.Id; model.BankName = bank.BankName; model.BankCode = bank.BankCode; model.Notes = bank.Notes; Cat_BankServices service = new Cat_BankServices(); var result = service.AddCatBanks(model); if (result == false) { model = null; } return(Json(model)); }
public void NUnit_Domain_RemoveCatBank() { Cat_BankServices service = new Cat_BankServices(); int rs = 0; for (int i = 1; i <= 1000000; i++) { var bank = new Cat_Bank { Id = i }; if (service.Remove<Cat_Bank>(bank.Id) == ActionStatus.DeleteSucceed.ToString()) { rs += 1; Console.WriteLine("Process Success >>> Delete >>> " + i); } } Console.WriteLine("Total success record: " + rs); //NUnit.Framework.Assert.IsTrue(result); }
public void NUnit_Domain_DeleteCatBank() { Cat_BankServices service = new Cat_BankServices(); int rs = 0; for (int i = 1; i <= 1000000; i++) { var bank = new Cat_Bank { Id = i }; if (service.Delete <Cat_Bank>(bank.Id) == ActionStatus.DeleteSucceed.ToString()) { rs += 1; Console.Write(" Process Success >>> DeleteEternity >>> " + i); } } Console.WriteLine("Total success record: " + rs); //NUnit.Framework.Assert.IsTrue(result); }
public void NUnit_Domain_AddCatBank() { Cat_BankServices service = new Cat_BankServices(); int rs=0; for (int i = 0; i < 1000000; i++) { var bank = new Cat_Bank { BankName = "NUnit Domain BankName " + i, BankCode = "NUnit-BankCode-" + i, Notes = "NUnit-Notes-"+i }; if (service.Add(bank) == ActionStatus.AddSucceed.ToString()) { rs += 1; Console.WriteLine("Process Success >>> Create >>> " + bank.Id + " | " + bank.BankName + " | " + bank.BankCode + " | " + bank.Notes); } } Console.WriteLine("Total success record: " + rs); }
public void NUnit_Domain_AddCatBank() { Cat_BankServices service = new Cat_BankServices(); int rs = 0; for (int i = 0; i < 1000000; i++) { var bank = new Cat_Bank { BankName = "NUnit Domain BankName " + i, BankCode = "NUnit-BankCode-" + i, Notes = "NUnit-Notes-" + i }; if (service.Add(bank) == ActionStatus.AddSucceed.ToString()) { rs += 1; Console.WriteLine("Process Success >>> Create >>> " + bank.Id + " | " + bank.BankName + " | " + bank.BankCode + " | " + bank.Notes); } } Console.WriteLine("Total success record: " + rs); }
public ActionResult GetCatBanks([DataSourceRequest] DataSourceRequest request) { Cat_BankServices service = new Cat_BankServices(); var list = service.GetCatBanks(); return Json(list.ToDataSourceResult(request)); }
public ActionResult GetCatBanksTest() { Cat_BankServices service = new Cat_BankServices(); var list = service.GetCatBanks(); return Json(list, JsonRequestBehavior.AllowGet); }
public JsonResult GetCatBankById([DataSourceRequest] DataSourceRequest request, Cat_Bank catbank) { Cat_BankServices service = new Cat_BankServices(); var CatBank = service.GetByIdCatBanks(catbank.Id); return Json(CatBank); }