예제 #1
0
        public ActionResult EditCompany(int id)
        {
            DataSet ds = cn.CompanyDS(id);
            DataRow dr = ds.Tables[0].Rows[0];

            cm.CompanyId     = id;
            cm.CompanyName   = dr.ItemArray[1].ToString();
            cm.ContactPerson = dr.ItemArray[2].ToString();
            cm.Email         = dr.ItemArray[3].ToString();
            cm.Phone         = dr.ItemArray[4].ToString();
            cm.Address       = dr.ItemArray[5].ToString();
            cm.Password      = dr.ItemArray[6].ToString();
            cm.Type          = 2.ToString();//edit Type
            return(View("RegisterCompany", cm));
        }