Exemplo n.º 1
0
        public void EditProfle()
        {
            var model = new Hre_Reward
            {
                DateOfIssuance = DateTime.Now,
                Reason = "T00000 test",
                RewardedTitleID = 2,
                RewardedDecidingOrgID = 2,
                RewardedTimeID = 2,
                DateOfEffective = DateTime.Now,
                Description = "T00000 test",
                UserApproveID = 2,
                Requester = "T00000 test",
                RequesterID = 2,
                RewardValue = 2,
                NoOfReward = "T00000 test",
                RewardedTypeID = 1,
                Attachment = "T00000 test",

            };
            var service = new Hre_RewardServices();
            var repo = service.Edit(model);
            Console.Write("Result: " + repo);

        }
Exemplo n.º 2
0
        public void NUnit_Reward_Domain_Add()
        {
            Hre_RewardServices service = new Hre_RewardServices();
            string             result  = string.Empty;
            int countSC = 0;

            for (int i = 1; i <= 10; i++)
            {
                var model = new Hre_Reward
                {
                    ProfileID   = 1,
                    Reason      = "Reason " + i,
                    RequesterID = 1,
                };
                result = service.Add(model);
                if (result != null)
                {
                    countSC += 1;
                    Console.WriteLine("Process Success >>> Create >>> " + model.Id
                                      + " | " + model.Reason
                                      );
                }
            }
            Console.WriteLine("Total success record: " + countSC);
        }
Exemplo n.º 3
0
 public void AddReward()
 {
     for (int i = 0; i < 10000; i++)
     {
         var model = new Hre_Reward
         {
             DateOfIssuance        = DateTime.Now,
             Reason                = "T00000" + i,
             RewardedTitleID       = 1,
             RewardedDecidingOrgID = 1,
             RewardedTimeID        = 1,
             DateOfEffective       = DateTime.Now,
             Description           = "T00000" + i,
             UserApproveID         = 1,
             Requester             = "T00000" + i,
             RequesterID           = 1,
             RewardValue           = 3,
             NoOfReward            = "T00000" + i,
             RewardedTypeID        = 1,
             Attachment            = "T00000" + i,
         };
         var service = new Hre_RewardServices();
         var repo    = service.Add(model);
         Console.Write("Record: " + repo);
     }
 }
Exemplo n.º 4
0
        public void AddReward()
        {
            for (int i = 0; i < 10000; i++)
            {
                var model = new Hre_Reward
                {
                    DateOfIssuance = DateTime.Now,
                    Reason = "T00000" + i,
                    RewardedTitleID = 1,
                    RewardedDecidingOrgID = 1,
                    RewardedTimeID = 1,
                    DateOfEffective = DateTime.Now,
                    Description = "T00000" + i,
                    UserApproveID = 1,
                    Requester = "T00000" + i,
                    RequesterID = 1,
                    RewardValue = 3,
                    NoOfReward = "T00000" + i,
                    RewardedTypeID = 1,
                    Attachment = "T00000" + i,
                   

                };
                var service = new Hre_RewardServices();
                var repo = service.Add(model);
                Console.Write("Record: " + repo);
            }
        }
Exemplo n.º 5
0
 public void NUnit_Reward_Domain_GetById()
 {
     string status = string.Empty;
     Hre_RewardServices service = new Hre_RewardServices();
     var model = new Hre_Reward { Id = 10 };
     var result = service.GetById<Hre_RewardEntity>(model.Id, ref status) as Hre_RewardEntity;
     NUnit.Framework.Assert.IsNotNull(result);
     Console.Write("SearchResult: " + result.Id 
         + " | " + result.ProfileID
         + " | " + result.Reason 
         );
 }
Exemplo n.º 6
0
        public void NUnit_Reward_Domain_GetById()
        {
            string             status  = string.Empty;
            Hre_RewardServices service = new Hre_RewardServices();
            var model = new Hre_Reward {
                Id = 10
            };
            var result = service.GetById <Hre_RewardEntity>(model.Id, ref status) as Hre_RewardEntity;

            NUnit.Framework.Assert.IsNotNull(result);
            Console.Write("SearchResult: " + result.Id
                          + " | " + result.ProfileID
                          + " | " + result.Reason
                          );
        }
Exemplo n.º 7
0
        public void NUnit_Reward_Domain_Delete()
        {
            Hre_RewardServices service = new Hre_RewardServices();
            int rs    = 0;
            var model = new Hre_Reward {
                Id = 3
            };
            string result = service.Delete <Hre_RewardEntity>(model.Id);

            if (result != null)
            {
                rs += 1;
                Console.WriteLine("Process Success >>> Delete >>> " + model.Id);
            }
        }
Exemplo n.º 8
0
 public void NUnit_Reward_Domain_Edit()
 {
     Hre_RewardServices service = new Hre_RewardServices();
     var model = new Hre_Reward
     {
         Id =10,
         ProfileID = 1,
         Reason = "Reason",
     };
     string result = service.Edit(model);
     if (result != string.Empty)
     {
         Console.WriteLine("Process Success >>> Update >>> " + model.Id
                 + " | " + model.ProfileID
                 + " | " + model.Reason
                 );
     }
 }
Exemplo n.º 9
0
        public void NUnit_Reward_Domain_Edit()
        {
            Hre_RewardServices service = new Hre_RewardServices();
            var model = new Hre_Reward
            {
                Id        = 10,
                ProfileID = 1,
                Reason    = "Reason",
            };
            string result = service.Edit(model);

            if (result != string.Empty)
            {
                Console.WriteLine("Process Success >>> Update >>> " + model.Id
                                  + " | " + model.ProfileID
                                  + " | " + model.Reason
                                  );
            }
        }
Exemplo n.º 10
0
        public void EditProfle()
        {
            var model = new Hre_Reward
            {
                DateOfIssuance        = DateTime.Now,
                Reason                = "T00000 test",
                RewardedTitleID       = 2,
                RewardedDecidingOrgID = 2,
                RewardedTimeID        = 2,
                DateOfEffective       = DateTime.Now,
                Description           = "T00000 test",
                UserApproveID         = 2,
                Requester             = "T00000 test",
                RequesterID           = 2,
                RewardValue           = 2,
                NoOfReward            = "T00000 test",
                RewardedTypeID        = 1,
                Attachment            = "T00000 test",
            };
            var service = new Hre_RewardServices();
            var repo    = service.Edit(model);

            Console.Write("Result: " + repo);
        }
Exemplo n.º 11
0
 public void NUnit_Reward_Domain_Add()
 {
     Hre_RewardServices service = new Hre_RewardServices();
     string result = string.Empty;
     int countSC = 0;
     for (int i = 1; i <= 10; i++)
     {
         var model = new Hre_Reward
         {
             ProfileID = 1,
             Reason = "Reason " + i,
             RequesterID = 1,
         };
         result = service.Add(model);
         if (result != null)
         {
             countSC += 1;
             Console.WriteLine("Process Success >>> Create >>> " + model.Id
                 + " | " + model.Reason
                 );
         }
     }
     Console.WriteLine("Total success record: " + countSC);
 }
Exemplo n.º 12
0
 public void NUnit_Reward_Domain_Remove()
 {
     Hre_RewardServices service = new Hre_RewardServices();
     int rs = 0;
     var model = new Hre_Reward { Id = 10 };
     string result = service.Remove<Hre_RewardEntity>(model.Id);
     if (result != null)
     {
         rs += 1;
         Console.WriteLine("Process Success >>> Remove >>> " + model.Id);
     }
 }