protected void databind() { E_Area data = new E_Area(); data.PersonalID = PersonalID; rpList.DataSource = new T_Area().GetPageList(data); rpList.DataBind(); }
/// <summary> /// 获取地区列表 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>tianzhenyun 2011-10-20</remarks> public DataTable GetPageList(E_Area data) { SqlParameter[] parameters = { new SqlParameter("@PersonalID", SqlDbType.Int) }; parameters[0].Value = data.PersonalID; DataTable dt = DbHelperSQL.RunProcedureTable("ProcPI_B_Area_ListSelect", parameters); return(dt); }
/// <summary> /// 删除地区 /// </summary> void AreaDelete() { MLMGC.Security.PersonalPage pp = new MLMGC.Security.PersonalPage(true); int areaid = int.Parse(nv["areaid"]); E_Area data = new E_Area(); data.PersonalID = pp.PersonalID; data.AreaID = areaid; bool b = new T_Area().Delete(data); HttpContext.Current.Response.Write(b ? "1" : "0"); }
/// <summary> /// 获取绑定显示的列表 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>tianzhenyun 2011-10-20</remarks> public DataTable GetShowList(E_Area data) { SqlParameter[] parameters = { new SqlParameter("@PersonalID", SqlDbType.Int), new SqlParameter("@CodeIsValue", SqlDbType.TinyInt) }; parameters[0].Value = data.PersonalID; parameters[1].Value = data.CodeIsValue ? 1 : 2; return(DbHelperSQL.RunProcedureTable("ProcPI_B_Area_ShowListSelect", parameters)); }
/// <summary> /// 地区是否存在 /// </summary> void AreaExists() { MLMGC.Security.PersonalPage pp = new MLMGC.Security.PersonalPage(true); int areaid = int.Parse(nv["areaid"]); string name = nv["name"]; E_Area data = new E_Area(); data.PersonalID = pp.PersonalID; data.AreaID = areaid; data.AreaName = name; bool b = new T_Area().Exists(data); HttpContext.Current.Response.Write(b ? "1" : "0"); }
/// <summary> /// 地区是否存在 /// </summary> void AreaExists() { MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); int areaid = int.Parse(nv["areaid"]); string code = nv["code"]; E_Area data = new E_Area(); data.EnterpriseID = ep.EnterpriceID; data.AreaID = areaid; data.AreaCode = code; bool b = new T_Area().Exists(data); HttpContext.Current.Response.Write(b ? "1" : "0"); }
/// <summary> /// 删除一条数据 /// </summary> /// <remarks>tianzhenyun 2011-10-20</remarks> public bool Delete(E_Area data) { SqlParameter[] parameters = { new SqlParameter("@AreaID", SqlDbType.Int, 4), new SqlParameter("@PersonalID", SqlDbType.Int, 4) }; parameters[0].Value = data.AreaID; parameters[1].Value = data.PersonalID; int ReturnValue = 0; DbHelperSQL.RunProcedures("ProcPI_B_Area_Delete", parameters, out ReturnValue); return(ReturnValue > 0); }
/// <summary> /// 录入新地区 /// </summary> void AreaAdd() { MLMGC.Security.PersonalPage pp = new MLMGC.Security.PersonalPage(true); //string code = nv["code"]; string name = nv["name"]; E_Area data = new E_Area(); data.PersonalID = pp.PersonalID; data.AreaID = 0; data.AreaCode = ""; data.AreaName = name; int areaid = new T_Area().Add(data); HttpContext.Current.Response.Write(areaid); }
/// <summary> /// 删除地区 /// </summary> void AreaDelete() { MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); int areaid = int.Parse(nv["areaid"]); E_Area data = new E_Area(); data.EnterpriseID = ep.EnterpriceID; data.AreaID = areaid; bool b = new T_Area().Delete(data); new MLMGC.BLL.Enterprise.T_Log().Add(new MLMGC.DataEntity.Enterprise.E_Log() { EnterpriseID = ep.EnterpriceID, UserID = ep.UserID, LogTitle = "删除地区", IP = MLMGC.COMP.Requests.GetRealIP() }); HttpContext.Current.Response.Write(b ? "1" : "0"); }
protected void databind() { E_Area data = new E_Area(); data.EnterpriseID = EnterpriceID; data.Page.PageSize = pageSize; data.Page.PageIndex = pageIndex; rpList.DataSource = new T_Area().GetPageList(data); rpList.DataBind(); //设置分页样式 pageList1.PageSize = pageSize; pageList1.CurrentPageIndex = pageIndex; pageList1.RecordCount = data.Page.TotalCount; pageList1.CustomInfoHTML = string.Format("共有记录 <span class='red_font'>{0}</span> 条", pageList1.RecordCount); pageList1.TextAfterPageIndexBox = " 页/" + pageList1.PageCount + " "; }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(E_Area data) { int ReturnValue; SqlParameter[] parameters = { new SqlParameter("@AreaID", SqlDbType.Int, 4), new SqlParameter("@EnterpriseID", SqlDbType.Int, 4), new SqlParameter("@AreaCode", SqlDbType.VarChar, 16) }; parameters[0].Value = data.AreaID; parameters[1].Value = data.EnterpriseID; parameters[2].Value = data.AreaCode; DbHelperSQL.RunProcedures("ProcEP_B_Area_Exists", parameters, out ReturnValue); return(ReturnValue > 0); }
/// <summary> /// 是否存在该记录 /// </summary> /// <remarks>tianzhenyun 2011-10-20</remarks> public bool Exists(E_Area data) { int ReturnValue; SqlParameter[] parameters = { new SqlParameter("@AreaID", SqlDbType.Int, 4), new SqlParameter("@PersonalID", SqlDbType.Int, 4), new SqlParameter("@AreaName", SqlDbType.VarChar, 128) }; parameters[0].Value = data.AreaID; parameters[1].Value = data.PersonalID; parameters[2].Value = data.AreaName; DbHelperSQL.RunProcedures("ProcPI_B_Area_Exists", parameters, out ReturnValue); return(ReturnValue > 0); }
/// <summary> /// 更新一条数据 /// </summary> /// <remarks>tianzhenyun 2011-10-20</remarks> public bool Update(E_Area data) { SqlParameter[] parameters = { new SqlParameter("@AreaID", SqlDbType.Int, 4), new SqlParameter("@PersonalID", SqlDbType.Int, 4), new SqlParameter("@AreaCode", SqlDbType.VarChar, 32), new SqlParameter("@AreaName", SqlDbType.VarChar, 128) }; parameters[0].Value = data.AreaID; parameters[1].Value = data.PersonalID; parameters[2].Value = data.AreaCode; parameters[3].Value = data.AreaName; int ReturnValue = 0; DbHelperSQL.RunProcedures("ProcPI_B_Area_Update", parameters, out ReturnValue); return(ReturnValue > 0); }
/// <summary> /// 分页获取列表 /// </summary> /// <param name="data"></param> /// <returns></returns> public DataTable GetPageList(E_Area data) { SqlParameter[] parameters = { new SqlParameter("@EnterpriseID", SqlDbType.Int), new SqlParameter("@PageSize", SqlDbType.Int), new SqlParameter("@PageIndex", SqlDbType.Int), new SqlParameter("@TotalCount", SqlDbType.Int) }; parameters[0].Value = data.EnterpriseID; parameters[1].Value = data.Page.PageSize; parameters[2].Value = data.Page.PageIndex; parameters[3].Direction = ParameterDirection.Output; DataTable dt = DbHelperSQL.RunProcedureTable("ProcEP_B_Area_PageSelect", parameters); data.Page.TotalCount = parameters[3].Value == DBNull.Value ? 0 : Convert.ToInt32(parameters[3].Value); return(dt); }
/// <summary> /// 录入新地区 /// </summary> void AreaAdd() { MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); string code = nv["code"]; string name = nv["name"]; E_Area data = new E_Area(); data.EnterpriseID = ep.EnterpriceID; data.AreaID = 0; data.AreaCode = code; data.AreaName = name; int areaid = new T_Area().Add(data); new MLMGC.BLL.Enterprise.T_Log().Add(new MLMGC.DataEntity.Enterprise.E_Log() { EnterpriseID = ep.EnterpriceID, UserID = ep.UserID, LogTitle = "添加地区", IP = MLMGC.COMP.Requests.GetRealIP() }); HttpContext.Current.Response.Write(areaid); }
/// <summary> /// 批量增加地区 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>qipengfei 2011-10-25</remarks> public bool BatchAdd(E_Area data) { SqlParameter[] parms = { new SqlParameter("@PersonalID", SqlDbType.Int, 4), new SqlParameter("@Child_AreaCode", SqlDbType.NVarChar), new SqlParameter("@Child_AreaName", SqlDbType.NVarChar), new SqlParameter("@Separation", SqlDbType.VarChar, 2) }; parms[0].Value = data.PersonalID; parms[1].Value = data.AreaCodeS; parms[2].Value = data.AreaNameS; parms[3].Value = MLMGC.COMP.Config.Separation; int ReturnValue = 0; DbHelperSQL.RunProcedures("ProcPI_B_Area_BatchInsert", parms, out ReturnValue); return(ReturnValue > 0); }
/// <summary> /// 得到一个对象实体 /// </summary> /// <remarks>tianzhenyun 2011-10-20</remarks> public E_Area GetModel(E_Area data) { SqlParameter[] parameters = { new SqlParameter("@AreaID", SqlDbType.Int, 4), new SqlParameter("@PersonalID", SqlDbType.Int, 4) }; parameters[0].Value = data.AreaID; parameters[1].Value = data.PersonalID; DataTable dt = DbHelperSQL.RunProcedureTable("ProcPI_B_Area_Select", parameters); if (dt != null && dt.Rows.Count == 1) { data.AreaCode = dt.Rows[0]["AreaCode"].ToString(); data.AreaName = dt.Rows[0]["AreaName"].ToString(); return(data); } return(null); }
/// <summary> /// 增加一条数据 /// </summary> /// <remarks>tianzhenyun 2011-10-20</remarks> public int Add(E_Area data) { int rowsAffected; SqlParameter[] parameters = { new SqlParameter("@AreaID", SqlDbType.Int, 4), new SqlParameter("@PersonalID", SqlDbType.Int, 4), new SqlParameter("@AreaCode", SqlDbType.VarChar, 32), new SqlParameter("@AreaName", SqlDbType.VarChar, 128) }; parameters[0].Direction = ParameterDirection.Output; parameters[1].Value = data.PersonalID; parameters[2].Value = data.AreaCode; parameters[3].Value = data.AreaName; DbHelperSQL.RunProcedure("ProcPI_B_Area_Insert", parameters, out rowsAffected); return((int)parameters[0].Value); }
/// <summary> /// 修改地区 /// </summary> void AreaUpdate() { MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); int areaid = int.Parse(nv["areaid"]); string code = nv["code"]; string name = nv["name"]; E_Area data = new E_Area(); data.EnterpriseID = ep.EnterpriceID; data.AreaID = areaid; data.AreaCode = code; data.AreaName = name; bool b = new T_Area().Update(data); new MLMGC.BLL.Enterprise.T_Log().Add(new MLMGC.DataEntity.Enterprise.E_Log() { EnterpriseID = ep.EnterpriceID, UserID = ep.UserID, LogTitle = "修改地区", IP = MLMGC.COMP.Requests.GetRealIP() }); HttpContext.Current.Response.Write(b ? "1" : "0"); }
/// <summary> /// 显示地区信息 /// </summary> void AreaShow() { MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); int areaid = int.Parse(nv["areaid"]); E_Area data = new E_Area(); data.EnterpriseID = ep.EnterpriceID; data.AreaID = areaid; data = new T_Area().GetModel(data); if (data == null) { data = new E_Area(); data.AreaID = 0; } JsonObjectCollection colDR = new JsonObjectCollection(); colDR.Add(new JsonStringValue("id", data.AreaID.ToString())); colDR.Add(new JsonStringValue("code", data.AreaCode)); colDR.Add(new JsonStringValue("name", data.AreaName)); HttpContext.Current.Response.Write(colDR.ToString()); }
void Update() { pos = this.transform.position; euler = this.transform.eulerAngles; float r = euler.z; if (r > 180) { r -= 360; } switch (mode) { case E_mode.Glide: //画像の傾きから移動方向を算出 move = addition(baseMove2, radian(r)).normalized; break; case E_mode.Roll: //画像の傾きから移動方向を算出 move = addition(baseMove2, radian(r)).normalized; //画像を傾かせる euler.z += eulerRot; //速度を下げる speed -= 0.006f; if (speed <= 0) { speed = 0; mode = E_mode.Stop; coroutine = StartCoroutine(delayStop(0.1f)); } break; case E_mode.Stop: break; case E_mode.Ride: if (cross(baseMove1, move) < 0) { move = addition(move, radian(-rideRot)).normalized; } else { move = addition(move, radian(rideRot)).normalized; } break; default: break; } Vector3 vecMove = move; if (pos.x >= highpoint1.x && pos.y <= boxHighPoint.y && area == E_Area.Player1) { if (vecMove.x >= 0) { vecMove.x = 0; } } else if (pos.x <= lowPoint2.x && pos.y <= boxHighPoint.y && area == E_Area.Player2) { if (vecMove.x <= 0) { vecMove.x = 0; } } else if (pos.y <= boxHighPoint.y && area == E_Area.Center) { vecMove.y = 0; } Debug.Log(vecMove); pos += vecMove * speed; this.transform.position = pos; this.transform.eulerAngles = euler; //位置判定 if (pos.x < highpoint1.x) { area = E_Area.Player1; } else if (pos.x > lowPoint2.x) { area = E_Area.Player2; } else { area = E_Area.Center; } if (pos.y < lowPoint1.y) { enabled = false; gameOverFlg = true; } }
/// <summary> /// 增加一条数据 /// </summary> public int Add(E_Area data) { return(dal.Add(data)); }
/// <summary> /// 批量增加地区 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>qipengfei 2011-10-25</remarks> public bool BatchAdd(E_Area data) { return(dal.BatchAdd(data)); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(E_Area data) { return(dal.Update(data)); }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(E_Area data) { return(dal.Delete(data)); }
/// <summary> /// 得到一个对象实体 /// </summary> public E_Area GetModel(E_Area data) { return(dal.GetModel(data)); }
/// <summary> /// 分页获取列表 /// </summary> /// <param name="data"></param> /// <returns></returns> public DataTable GetPageList(E_Area data) { return(dal.GetPageList(data)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(E_Area data) { return(dal.Exists(data)); }
/// <summary> /// 获取绑定显示的列表 /// </summary> /// <param name="data"></param> /// <returns></returns> public DataTable GetShowList(E_Area data) { return(dal.GetShowList(data)); }