public IActionResult Post([FromBody] Insert_Contract_Post_Method_API b)
        {
            int res = _procrepo.Addcontractwithproccall(b);

            if (res != 0)
            {
                return(Ok());
            }
            return(Forbid());
        }
Exemplo n.º 2
0
        public int Addcontractwithproccall(Insert_Contract_Post_Method_API b)
        {
            ctx.Database.ExecuteSqlCommand("EXEC Insert_Contract_Post_Method_API @Name,@Address,@dateofbirth, @gender, @saledate, @country",
                                           new SqlParameter("@Name", b.Name),
                                           new SqlParameter("@Address", b.Address),
                                           new SqlParameter("@dateofbirth", b.Dateofbirth),
                                           new SqlParameter("@gender", b.Gender),
                                           new SqlParameter("@saledate", b.Saledate),
                                           new SqlParameter("@country", b.Country));

            int res = ctx.SaveChanges();

            ctx.Inscon.Add(b);
            return(res);
        }
Exemplo n.º 3
0
 public int Updatecontractwithproccall(Insert_Contract_Post_Method_API b, string Custname)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 4
0
 public int AddContract(Insert_Contract_Post_Method_API b)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 5
0
 public int UpdateContract(string custname, Insert_Contract_Post_Method_API b)
 {
     throw new NotImplementedException();
 }