Example #1
0
        public JsonResult GetCatBankById([DataSourceRequest] DataSourceRequest request, Cat_Bank catbank)
        {
            Cat_BankServices service = new Cat_BankServices();
            var CatBank = service.GetByIdCatBanks(catbank.Id);

            return(Json(CatBank));
        }
Example #2
0
        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));
        }
Example #3
0
        public ActionResult GetCatBanksTest()
        {
            Cat_BankServices service = new Cat_BankServices();
            var list = service.GetCatBanks();

            return(Json(list, JsonRequestBehavior.AllowGet));
        }
Example #4
0
 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);
 }
Example #5
0
        public ActionResult GetCatBanks([DataSourceRequest] DataSourceRequest request)
        {
            Cat_BankServices service = new Cat_BankServices();
            var list = service.GetCatBanks();

            return(Json(list.ToDataSourceResult(request)));
        }
Example #6
0
 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);
 }
Example #7
0
 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);
 }
Example #8
0
 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);
 }
Example #9
0
        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);
        }
Example #10
0
 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);
 }
Example #11
0
        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);
        }
Example #12
0
        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));
        }
Example #13
0
 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);
     }
 }
Example #14
0
        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));
        }
Example #15
0
        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);
            }
        }
Example #16
0
        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);
        }
Example #17
0
        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);
        }
Example #18
0
 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);
 }
Example #19
0
        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);
        }
Example #20
0
 public ActionResult GetCatBanks([DataSourceRequest] DataSourceRequest request)
 {
     Cat_BankServices service = new Cat_BankServices();
     var list = service.GetCatBanks();
     return Json(list.ToDataSourceResult(request));
 }
Example #21
0
 public ActionResult GetCatBanksTest()
 {
     Cat_BankServices service = new Cat_BankServices();
     var list = service.GetCatBanks();
     return Json(list, JsonRequestBehavior.AllowGet);
 }
Example #22
0
 public JsonResult GetCatBankById([DataSourceRequest] DataSourceRequest request, Cat_Bank catbank)
 {
     Cat_BankServices service = new Cat_BankServices();
     var CatBank = service.GetByIdCatBanks(catbank.Id);
     return Json(CatBank);
 }