diff --git a/App_Code/CommonUse.cs b/App_Code/CommonUse.cs index 05e05e1..8390abb 100644 --- a/App_Code/CommonUse.cs +++ b/App_Code/CommonUse.cs @@ -171,7 +171,7 @@ public class CommonUse message = string.Empty; CommonUse commonUse = new CommonUse(); string[] postionc = postionCut.Split(new string[] { "^" }, StringSplitOptions.RemoveEmptyEntries); - PYPostion = ""; + PYPostion = "0,0"; Point GrXY; int PostionWW = 0; int PostionHH = 0; diff --git a/Temp/Default.aspx.cs b/Temp/Default.aspx.cs index d83e7f7..e491a65 100644 --- a/Temp/Default.aspx.cs +++ b/Temp/Default.aspx.cs @@ -56,6 +56,7 @@ public partial class 外部答题卡_Default : System.Web.UI.Page case 1: UpdateTempData(); break; + // 锁定 case 2: LockTemp(); break; @@ -321,7 +322,7 @@ public partial class 外部答题卡_Default : System.Web.UI.Page Response.Write("NO PICTURE"); } string[] GetData = totalHtml.Split('$'); - string PYPostionList = ""; + string PYPostionList = "0,0"; diff --git a/Temp/SplitQuestion.aspx.cs b/Temp/SplitQuestion.aspx.cs index c9eeaba..39e69d7 100644 --- a/Temp/SplitQuestion.aspx.cs +++ b/Temp/SplitQuestion.aspx.cs @@ -220,8 +220,14 @@ public partial class Temp_SplitQuestion : System.Web.UI.Page /// private string TempV(string GetData, string PYPostionList, int oldWidth, int oldHeight) { - double pyLeft = Convert.ToInt32(PYPostionList.Split(',')[0]); - double pyTop = Convert.ToInt32(PYPostionList.Split(',')[1]); + + double pyLeft=0, pyTop = 0; + if (string.IsNullOrWhiteSpace(PYPostionList) && PYPostionList.Contains(",")) + { + pyLeft = Convert.ToInt32(PYPostionList.Split(',')[0]); + pyTop = Convert.ToInt32(PYPostionList.Split(',')[1]); + } + double Xtop = 0; double Xleft = 0; double Xwidth = 0; diff --git a/Temp/UserNoPostionTemp.aspx b/Temp/UserNoPostionTemp.aspx index 68f1372..587c9fb 100644 --- a/Temp/UserNoPostionTemp.aspx +++ b/Temp/UserNoPostionTemp.aspx @@ -149,21 +149,82 @@ - + diff --git a/Temp/UserNoPostionTemp.aspx.cs b/Temp/UserNoPostionTemp.aspx.cs index f806aae..249fefa 100644 --- a/Temp/UserNoPostionTemp.aspx.cs +++ b/Temp/UserNoPostionTemp.aspx.cs @@ -96,12 +96,12 @@ public partial class Temp_UserNoPostionTemp : System.Web.UI.Page if (!string.IsNullOrEmpty(GroupNo)) { - sql = "select * from MK_TempleteDataUserOnePaper where DetaID_bigint=" + TempID + " AND UserID_bigint=" + UserID + " AND GroupNo_varchar='" + GroupNo + "'"; + sql = "select * from MK_TempleteDataUserOnePaper where DetaID_bigint=" + TempID + " AND GroupNo_varchar='" + GroupNo + "'"; } if (!string.IsNullOrEmpty(BatchID)) { - sql = "select * from MK_TempleteDataUserBatch where DetaID_bigint=" + TempID + " AND UserID_bigint=" + UserID + " AND BatchID_nvarchar='" + BatchID + "'"; + sql = "select * from MK_TempleteDataUserBatch where DetaID_bigint=" + TempID + " AND BatchID_nvarchar='" + BatchID + "'"; } @@ -166,7 +166,7 @@ public partial class Temp_UserNoPostionTemp : System.Web.UI.Page MySqlParameter[] sp; if (BatchID != "") { - sql = "Update MK_TempleteDataUserBatch SET Rotate_float=@Rotate_float, TempValue_nvarchar=@TempValue_nvarchar,HideAreaPostionList_nvarchar=@HideAreaPostionList_nvarchar,islocked_int=1 where DetaID_bigint=" + TempID + " AND UserID_bigint=" + Convert.ToInt64(UserID) + " AND BatchID_nvarchar='" + BatchID + "'"; + sql = "Update MK_TempleteDataUserBatch SET Rotate_float=@Rotate_float, TempValue_nvarchar=@TempValue_nvarchar,HideAreaPostionList_nvarchar=@HideAreaPostionList_nvarchar,islocked_int=1 where DetaID_bigint=" + TempID + " AND BatchID_nvarchar='" + BatchID + "'"; sp = new MySqlParameter[] { new MySqlParameter("@TempValue_nvarchar",totalHtml), new MySqlParameter("@HideAreaPostionList_nvarchar",HideAreaPostionList), @@ -176,7 +176,7 @@ public partial class Temp_UserNoPostionTemp : System.Web.UI.Page else if (GroupNo != "") { - sql = "Update MK_TempleteDataUserOnePaper SET Rotate_float=@Rotate_float, TempValue_nvarchar=@TempValue_nvarchar,HideAreaPostionList_nvarchar=@HideAreaPostionList_nvarchar,islocked_int=1 where DetaID_bigint=" + TempID + " AND UserID_bigint=" + Convert.ToInt64(UserID) + " AND GroupNo_varchar='" + GroupNo + "'"; + sql = "Update MK_TempleteDataUserOnePaper SET Rotate_float=@Rotate_float, TempValue_nvarchar=@TempValue_nvarchar,HideAreaPostionList_nvarchar=@HideAreaPostionList_nvarchar,islocked_int=1 where DetaID_bigint=" + TempID + " AND GroupNo_varchar='" + GroupNo + "'"; sp = new MySqlParameter[] { new MySqlParameter("@TempValue_nvarchar",totalHtml), new MySqlParameter("@HideAreaPostionList_nvarchar",HideAreaPostionList), @@ -399,11 +399,11 @@ public partial class Temp_UserNoPostionTemp : System.Web.UI.Page string sql = "select * from MK_TempleteDataUser where DetaID_bigint=" + TempID + " AND UserID_bigint=" + UserID; if (BatchID != "") { - sql = @"select * from MK_TempleteDataUserBatch where DetaID_bigint=" + TempID + " AND UserID_bigint=" + UserID; + sql = @"select * from MK_TempleteDataUserBatch where DetaID_bigint=" + TempID + " AND BatchID_nvarchar='" + BatchID + "'"; } else if (GroupNo != "") { - sql = @"select * from MK_TempleteDataUserOnePaper where DetaID_bigint=" + TempID + " AND UserID_bigint=" + UserID; + sql = @"select * from MK_TempleteDataUserOnePaper where DetaID_bigint=" + TempID + " AND GroupNo_varchar='" + GroupNo + "'"; } DataTable dt = new MysqlDBHelper(tenant).ExecuteQuery(sql); if (dt.Rows.Count <= 0) diff --git a/js/indexNoPostion.js b/js/indexNoPostion.js index 78d3de4..87b6241 100644 --- a/js/indexNoPostion.js +++ b/js/indexNoPostion.js @@ -482,6 +482,7 @@ function GetBiaoZhunDianPostion() { $(".biaozhundian_select").each(function () { xy += parseFloat($(this).position().left) + "," + parseFloat($(this).position().top) + "," + parseFloat($(this).width()) + "," + parseFloat($(this).height()) + "," + $(this).attr("wenzimiaoshu") + "^"; }) + return xy.trim('^'); } @@ -687,6 +688,19 @@ function BaseDataBind() { SetPyPostion(piyueList); GetZhuguantiScoreList(); SetBiaoZhunDianPostion(biaozhundian); + + if (IsPostionValue == "1" || IsPostionValue == "True") { + + + $(".main_tabletop").draggable("destroy") + $(".main_tabletop").resizable("destroy") + + for (var i = 0; i <= 3;i++) { + $("#draggable_" + i).draggable({ containment: ".main_papermain" }); + $("#draggable_" + i).resizable({ containment: ".main_papermain", handles: 'all' }); + } + + } }