/// <summary> /// 更新Guide2类信息 /// </summary> /// <param name="guide2">二级指标管理类参数</param> /// <returns>更新成功返回true 否则返回false</returns> public bool UpdateGuide2(Guide2 guide2) { string strSQL = ""; SqlDataAdapter sa = null; SqlCommandBuilder builder = null; DataRow row = null; DataTable dt = null; bool returnValue = false; if (guide2 != null) { if (guide2.Guide2ID == 0) { strSQL = "SELECT Top 0 * FROM Sys_Guide2"; } else { strSQL = "SELECT Top 1 * FROM Sys_Guide2 WHERE Guide2ID = " + guide2.Guide2ID.ToString(); } dt = CMMgr.GetDataTable(strSQL); if (dt.Rows.Count > 0) { row = dt.Rows[0]; } else { row = dt.NewRow(); } row["Guide2Name"] = guide2.Guide2Name; row["GuideID"] = guide2.Guide.GuideID; if (dt.Rows.Count == 0) { dt.Rows.Add(row); } SqlConnection conn = CMMgr.GetConnection(); using (sa = new SqlDataAdapter("SELECT Top 0 * FROM Sys_Guide2", conn)) { try { builder = new SqlCommandBuilder(sa); sa.Update(dt); returnValue = true; } finally { conn.Close(); conn.Dispose(); } } } return(returnValue); }
public AddNumber() { this.m_AddNumberID = 0; this.m_Title = ""; this.m_Content = ""; this.m_IsAudi = ""; this.m_Person = new Person(); this.m_Client = new Client(); this.m_Guide2 = new Guide2(); this.m_Guide = new Guide(); this.m_AddInt = 0; }
public Asses() { this.m_AssesID = 0; this.m_Person = new Person(); this.m_Guide = new Guide(); this.m_Guide2 = new Guide2(); this.m_Scale1 = 0; this.m_Scale2 = 0; this.m_Scale3 = 0; this.m_Scale1Name = ""; this.m_Scale2Name = ""; this.m_Scale3Name = ""; this.m_CountNumber = 0; this.m_Memo = ""; }
private void ManageButton_Click(object sender, RoutedEventArgs e) { Guide2.Navigate(typeof(CommManage)); if (Guide2.Visibility == Visibility.Collapsed) { Guide2.Visibility = Visibility.Visible; Guide.Visibility = Visibility.Collapsed; } else if (Guide2.Visibility == Visibility.Visible) { Guide2.Visibility = Visibility.Collapsed; } }
/// <summary> /// 获取一条Guide2类信息 /// </summary> /// <param name="Guide2ID">登录编号</param> /// <returns>一条Guide2类记录</returns> public Guide2 GetGuide2(string Guide2ID) { Guide2 guide2 = new Guide2(); GuideMgr gMgr = new GuideMgr(); string strSQL = "SELECT Top 1 * FROM Sys_Guide2 WHERE Guide2ID = " + Guide2ID; DataTable dt = CMMgr.GetDataTable(strSQL); if (dt.Rows.Count > 0) { DataRow row = dt.Rows[0]; guide2.Guide2ID = int.Parse(row["Guide2ID"].ToString()); guide2.Guide2Name = row["Guide2Name"].ToString(); guide2.Guide = gMgr.GetGuide(row["GuideID"].ToString()); return(guide2); } else { return(guide2); } }
public Communications() { this.InitializeComponent(); Guide.Navigate(typeof(CommRequest)); Guide2.Navigate(typeof(CommManage)); }
void Update() { RaycastHit info = new RaycastHit(); bool next = Input.GetMouseButtonDown(0) & Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out info); switch (currentVector) { case 0: if (Input.GetKey(KeyCode.LeftShift)) { P1 = new Vector2(info.point.x, info.point.z); } else { P1 = new Vector2(Mathf.Round(info.point.x), Mathf.Round(info.point.z)); } if (next) { currentVector++; Guide1.SetActive(true); } PointGuide.transform.position = new Vector3(P1.x, 0.01f, P1.y); break; case 1: if (Input.GetKey(KeyCode.LeftShift)) { P2 = new Vector2(info.point.x, info.point.z); } else { P2 = new Vector2(Mathf.Round(info.point.x), Mathf.Round(info.point.z)); } if (next) { currentVector++; Guide2.SetActive(true); RoadGuide.SetActive(true); } Guide1.transform.position = new Vector3(P1.x, 0, P1.y) + (new Vector3(P2.x - P1.x, 0.01f, P2.y - P1.y) / 2); Guide1.transform.localScale = new Vector3(Guide1.transform.lossyScale.x, 1, (P1 - P2).magnitude / 10); Guide1.transform.LookAt(new Vector3(P2.x, 0, P2.y)); PointGuide.transform.position = new Vector3(P2.x, 0.01f, P2.y); break; case 2: if (Input.GetKey(KeyCode.LeftShift)) { P3 = new Vector2(info.point.x, info.point.z); } else { P3 = new Vector2(Mathf.Round(info.point.x), Mathf.Round(info.point.z)); } if (next) { Mesh mshj = PathMeshGenerator.Generate(new PathInfo(P1, P2, P3, new Spline(new Vector2(0, 0), new Vector2(1, 0), 0, 0)), 3f); var road = new GameObject("Road"); var filjt = road.AddComponent <MeshFilter>(); filjt.mesh = mshj; var rend = road.AddComponent <MeshRenderer>(); rend.material = mat; currentVector = 0; Guide1.SetActive(false); Guide2.SetActive(false); RoadGuide.SetActive(false); break; } Guide2.transform.position = new Vector3(P3.x, 0, P3.y) + (new Vector3(P2.x - P3.x, 0.01f, P2.y - P3.y) / 2); Guide2.transform.localScale = new Vector3(Guide1.transform.lossyScale.x, 1, (P3 - P2).magnitude / 10); Guide2.transform.LookAt(new Vector3(P2.x, 0, P2.y)); Mesh msh = PathMeshGenerator.Generate(new PathInfo(P1, P2, P3, new Spline(new Vector2(0, 0), new Vector2(1, 0), 0, 0)), 3f); var filt = RoadGuide.GetComponent <MeshFilter>(); filt.mesh = msh; PointGuide.transform.position = new Vector3(P3.x, 0.01f, P3.y); break; } }