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

            if (res != 0)
            {
                return(Ok());
            }
            return(Forbid());
        }
Esempio 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);
        }
Esempio n. 3
0
 public int Updatecontractwithproccall(Insert_Contract_Post_Method_API b, string Custname)
 {
     throw new NotImplementedException();
 }
Esempio n. 4
0
 public int AddContract(Insert_Contract_Post_Method_API b)
 {
     throw new NotImplementedException();
 }
Esempio n. 5
0
 public int UpdateContract(string custname, Insert_Contract_Post_Method_API b)
 {
     throw new NotImplementedException();
 }