コード例 #1
0
        public IActionResult Create(IFormCollection formcollection)
        {
            structure str = new structure();

            str.code       = Convert.ToInt32(formcollection["code"]);
            str.abr        = formcollection["abr"].ToString();
            str.desig      = formcollection["desig"].ToString();
            str.adr        = formcollection["adr"].ToString();
            str.telephone  = (formcollection["telephone"]).ToString();
            str.fax        = (formcollection["fax"]).ToString();
            str.IDattaché  = Convert.ToInt32(formcollection["idattaché"]);
            str.IDpersonne = Convert.ToInt32(formcollection["idpersonne"]);
            lstructure liste = new lstructure();

            liste.addstructure(str);



            return(RedirectToAction("Lstruct"));
        }