public JsonResult completeEDI(string listselectedProcess, string listJyuProcess) { string ConStringEx = Models.MasterModels.ConStringEx; DataTable dtResult = new DataTable(); using (SqlConnection con = new SqlConnection(ConStringEx)) { dtResult = new DataTable(); SqlCommand cmd = new SqlCommand("SELECT * FROM D1000_EDI " + " WHERE JYUNO " + listselectedProcess, con); con.Open(); SqlDataAdapter ada = new SqlDataAdapter(cmd); ada.Fill(dtResult); con.Close(); foreach (DataRow row in dtResult.Rows) { Models.JyuucyuuModels jyucyu = new Models.JyuucyuuModels { Jyuucyuno = row["JYUNO"].ToString(), Tokuicode = row["TOKCD"].ToString(), Tokuiname = row["TNAME"].ToString(), Nounyucode = row["NOUCD"].ToString(), Nonyuname = row["NNAME"].ToString(), Seihincode = row["SEICD"].ToString(), Seihinzuban = row["ZUBAN"].ToString(), Seihinname = row["NAME"].ToString(), Seihinkisyu = row["KISYU"].ToString(), Quantity = row["JYUSU"].ToString(), Tanka = row["JTANKA"].ToString(), Nouki = row["NOUKI"].ToString(), Nounyu = row["YDATE"].ToString(), Bumoncode = row["BMNCD"].ToString(), Tantoucode = row["JTANCD"].ToString(), Cyumonno1 = row["CYUNO"].ToString(), Cyumonno2 = row["EDANO"].ToString(), Seizou = row["SEIZO"].ToString(), Bikou = row["BIKOU"].ToString(), Ndate = row["NDATE"].ToString(), Status = row["STATUS"].ToString() }; jyucyu.inputTESCWORK(); } } List <Models.JyuucyuuModels> listJyu = new List <Models.JyuucyuuModels>(); using (SqlConnection con = new SqlConnection(ConStringEx)) { dtResult = new DataTable(); SqlCommand cmd = new SqlCommand("SELECT JYUNO,TOKCD,TNAME,NOUCD,NNAME,SEICD,ZUBAN,NAME,KISYU,JYUSU,JTANKA,NOUKI,YDATE,BMNCD,JTANCD,CYUNO,EDANO,SEIZO,BIKOU,NDATE,STATUS FROM D1000_EDI " + " WHERE JYUNO " + listJyuProcess, con); con.Open(); SqlDataAdapter ada = new SqlDataAdapter(cmd); ada.Fill(dtResult); con.Close(); foreach (DataRow row in dtResult.Rows) { Models.JyuucyuuModels jyucyu = new Models.JyuucyuuModels { Jyuucyuno = row["JYUNO"].ToString(), Tokuicode = row["TOKCD"].ToString(), Tokuiname = row["TNAME"].ToString(), Nounyucode = row["NOUCD"].ToString(), Nonyuname = row["NNAME"].ToString(), Seihincode = row["SEICD"].ToString(), Seihinzuban = row["ZUBAN"].ToString(), Seihinname = row["NAME"].ToString(), Seihinkisyu = row["KISYU"].ToString(), Quantity = row["JYUSU"].ToString(), Tanka = row["JTANKA"].ToString(), Nouki = row["NOUKI"].ToString(), Nounyu = row["YDATE"].ToString(), Bumoncode = row["BMNCD"].ToString(), Tantoucode = row["JTANCD"].ToString(), Cyumonno1 = row["CYUNO"].ToString(), Cyumonno2 = row["EDANO"].ToString(), Seizou = row["SEIZO"].ToString(), Bikou = row["BIKOU"].ToString(), Ndate = row["NDATE"].ToString(), Status = row["STATUS"].ToString(), }; listJyu.Add(jyucyu); } } Models.JyuucyuuModels[] result = listJyu.ToArray <Models.JyuucyuuModels>(); return(Json(result, JsonRequestBehavior.AllowGet)); }
public string registerOrder(Models.JyuucyuuModels newYuucyu) { return(newYuucyu.inputTESCWORK()); }