public bool Manage(string Filter, string value, DataTable dt) { try { return(pdl.Manage(Filter, value, dt)); } catch (Exception) { throw; } }
public ActionResult SaveUploadPlan() { var FACode = Request["FACode"].Split(','); var Milestone = Request["Milestone"].Split(','); var Stage = Request["Stage"].Split(','); var Plan = Request["item.Plan"].Split(','); var Forecast = Request["item.Forecast"].Split(','); var Target = Request["item.Target"].Split(','); var Actual = Request["item.Actual"].Split(','); var Status = Request["Status"].Split(','); dbDataTable ddt = new dbDataTable(); //DataTable dtRecord = ddt.Tb_ImportProjectPlant(); //DataTable dtPlan = new DataTable(); PM_ImportProjectPlanDL dd = new PM_ImportProjectPlanDL(); try { // List<PM_ImportProjectPlan> plan = dtRecord.ToList<PM_ImportProjectPlan>(); DataTable dt = ddt.PM_ImportList(); for (int i = 0; i < FACode.Length; i++) { myDataTable.AddRow(dt, "Value1", FACode[i], "Value2", Milestone[i], "Value3", Stage[i], "Value4", Plan[i], "Value5", Forecast[i], "Value6", Target[i], "Value7", Actual[i], "Value8", Status[i]); } var _Flag = dd.Manage("Save_Project_Plan", "20021", dt); if (_Flag) { TempData["msg_success"] = "Save successfully."; } } catch (Exception ex) { TempData["msg_error"] = ex.Message; } return(View("~/Areas/Project/Views/ImportProjectPlan/Index.cshtml")); }