public JsonResult ht_qlphongban_LoadCoQuanJson() { List <coquan> cq = new List <coquan>(); DataTable dt = dataAsset.data.outputdataTable("ht_qlphongban_LoadCoQuan"); for (int i = 0; i < dt.Rows.Count; i++) { if (dt.Rows[i]["CQQUANLY"].ToString() == "") { coquan cquan = new coquan(); cquan.Macoquan = dt.Rows[i]["MACOQUAN"].ToString(); cquan.Tencoquan = dt.Rows[i]["TENCOQUAN"].ToString(); cq.Add(cquan); } } return(Json(cq, JsonRequestBehavior.AllowGet)); }
public List <coquan> ht_quanlyphong_loadcoquancon(string cqquanly) { string[] namepara = { "@cqquanly" }; object[] valuepara = { cqquanly }; List <coquan> cq = new List <coquan>(); DataTable dt = dataAsset.data.outputdataTable("ht_quanlyphong_loadcoquancon", namepara, valuepara); for (int i = 0; i < dt.Rows.Count; i++) { coquan cquan = new coquan(); cquan.Macoquan = dt.Rows[i]["MACOQUAN"].ToString(); cquan.Tencoquan = dt.Rows[i]["TENCOQUAN"].ToString(); cq.Add(cquan); } return(cq); }