public ActionResult AddProjectContract(string id) { ContractBas Bas = new ContractBas(); Bas.StrCID = ContractMan.GetNewShowCID(); DataTable dt = ContractMan.getNewMoneyFromProjectBas(id); if (dt.Rows.Count > 0) { Bas.StrPContractAmount = Convert.ToDecimal(dt.Rows[0]["ContractAmount"]); Bas.StrPBudget = Convert.ToDecimal(dt.Rows[0]["Budget"]); Bas.StrPCost = Convert.ToDecimal(dt.Rows[0]["Cost"]); Bas.StrPProfit = Convert.ToDecimal(dt.Rows[0]["Profit"]); } if (id != null) { Bas.StrPID = id; } return(View(Bas)); }