예제 #1
0
 /// <summary>
 /// 初始化数据
 /// </summary>
 /// <param name="ut"></param>
 private void OnStartData(sys_PendingCommentEntity ut)
 {
     sys_PendingComment_P_PendingID_Input.Text      = sys_PendingComment_P_PendingID_Disp.Text = ut.P_PendingID.ToString();
     sys_PendingComment_P_CommentPostID_Input.Text  = sys_PendingComment_P_CommentPostID_Disp.Text = ut.P_CommentPostID.ToString();
     sys_PendingComment_P_CommentStauts_Input.Text  = sys_PendingComment_P_CommentStauts_Disp.Text = ut.P_CommentStauts.ToString();
     sys_PendingComment_P_CommentContent_Input.Text = sys_PendingComment_P_CommentContent_Disp.Text = ut.P_CommentContent.ToString();
     sys_PendingComment_P_CommentRemarks_Input.Text = sys_PendingComment_P_CommentRemarks_Disp.Text = ut.P_CommentRemarks.ToString();
     sys_PendingComment_P_Pre_Input.Text            = sys_PendingComment_P_Pre_Disp.Text = ut.P_Pre.ToString();
 }
예제 #2
0
        protected void Button3_Click(object sender, EventArgs e)
        {
            if (hdPendingID.Value != "")
            {
                int    sys_PendingComment_P_PendingID_Value      = int.Parse(hdPendingID.Value);
                int    sys_PendingComment_P_CommentPostID_Value  = Common.Get_UserID;
                string sys_PendingComment_P_CommentContent_Value = (string)Common.sink(sys_PendingComment_P_CommentContent_Input.UniqueID, MethodType.Post, 2147483647, 1, DataType.Str);
                string sys_PendingComment_P_CommentRemarks_Value = "";
                string sys_PendingComment_P_Pre = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                string sys_PendingComment_P_CommentStauts_Value = DropDownList1.SelectedValue;
                sys_PendingCommentEntity ut = BusinessFacadeDLT.sys_PendingCommentDisp(int.Parse(hdPendingID.Value));

                ut.P_PendingID      = sys_PendingComment_P_PendingID_Value;
                ut.P_CommentPostID  = sys_PendingComment_P_CommentPostID_Value;
                ut.P_CommentContent = sys_PendingComment_P_CommentContent_Value;
                ut.P_CommentRemarks = sys_PendingComment_P_CommentRemarks_Value;
                ut.P_Pre            = sys_PendingComment_P_Pre;
                ut.P_CommentStauts  = int.Parse(sys_PendingComment_P_CommentStauts_Value);

                if (sys_PendingComment_P_CommentContent_Value == "")
                {
                    Response.Write("<script language='javascript'>alert('评论内容不能为空!');</script>");
                    return;
                }

                ut.DataTable_Action_ = DataTable_Action.Insert;


                Int32 rInt = BusinessFacadeDLT.sys_PendingCommentInsertUpdateDelete(ut);
                if (rInt > 0)
                {
                    //同时更新待办事项状态
                    sys_PendingMattersEntity ut1 = BusinessFacadeDLT.sys_PendingMattersDisp(int.Parse(hdPendingID.Value));
                    ut1.P_IsDeal          = int.Parse(sys_PendingComment_P_CommentStauts_Value);
                    ut1.DataTable_Action_ = DataTable_Action.Update;
                    Int32 rInt1 = BusinessFacadeDLT.sys_PendingMattersInsertUpdateDelete(ut1);
                    if (rInt1 > 0)
                    {
                        Response.Write("<script language='javascript'>alert('回复成功!');</script>");
                        Start1();
                        TabOptionWebControls1.SelectIndex = 3;
                        View_PendingInfo(hdPendingID.Value);
                    }
                }
            }
            else
            {
                Response.Write("<script language='javascript'>alert('请先选择一个待处理事项!');</script>");
            }
        }
예제 #3
0
        /// <summary>
        /// 增加/修改事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button1_Click(object sender, EventArgs e)
        {
            int    sys_PendingComment_P_PendingID_Value      = (int)Common.sink(sys_PendingComment_P_PendingID_Input.UniqueID, MethodType.Post, 10, 1, DataType.Int);
            int    sys_PendingComment_P_CommentPostID_Value  = (int)Common.sink(sys_PendingComment_P_CommentPostID_Input.UniqueID, MethodType.Post, 10, 1, DataType.Int);
            int    sys_PendingComment_P_CommentStauts_Value  = (int)Common.sink(sys_PendingComment_P_CommentStauts_Input.UniqueID, MethodType.Post, 10, 0, DataType.Int);
            string sys_PendingComment_P_CommentContent_Value = (string)Common.sink(sys_PendingComment_P_CommentContent_Input.UniqueID, MethodType.Post, 2147483647, 1, DataType.Str);
            string sys_PendingComment_P_CommentRemarks_Value = (string)Common.sink(sys_PendingComment_P_CommentRemarks_Input.UniqueID, MethodType.Post, 50, 0, DataType.Str);
            string sys_PendingComment_P_Pre_Value            = (string)Common.sink(sys_PendingComment_P_Pre_Input.UniqueID, MethodType.Post, 512, 0, DataType.Str);
            sys_PendingCommentEntity ut = BusinessFacadeDLT.sys_PendingCommentDisp(IDX);

            ut.P_PendingID      = sys_PendingComment_P_PendingID_Value;
            ut.P_CommentPostID  = sys_PendingComment_P_CommentPostID_Value;
            ut.P_CommentStauts  = sys_PendingComment_P_CommentStauts_Value;
            ut.P_CommentContent = sys_PendingComment_P_CommentContent_Value;
            ut.P_CommentRemarks = sys_PendingComment_P_CommentRemarks_Value;
            ut.P_Pre            = sys_PendingComment_P_Pre_Value;

            if (CMD == "New")
            {
                ut.DataTable_Action_ = DataTable_Action.Insert;
            }
            else if (CMD == "Edit")
            {
                ut.DataTable_Action_ = DataTable_Action.Update;
            }
            else
            {
                EventMessage.MessageBox(2, "不存在操作字符串!", "不存在操作字符串!", Icon_Type.Error, Common.GetHomeBaseUrl("Default.aspx"));
            }
            Int32 rInt = BusinessFacadeDLT.sys_PendingCommentInsertUpdateDelete(ut);

            if (rInt > 0)
            {
                string OpTxt = string.Format("增加sys_PendingComment成功!(ID:{0})", rInt);
                if (ut.DataTable_Action_ == DataTable_Action.Update)
                {
                    OpTxt = string.Format("修改sys_PendingComment成功!(ID:{0})", IDX);
                }
                EventMessage.MessageBox(1, "操作成功", OpTxt, Icon_Type.OK, Common.GetHomeBaseUrl("Default.aspx"));
            }
            else if (rInt == -2)
            {
                EventMessage.MessageBox(1, "操作失败", "操作失败,存在相同的键值(用户名/数据)!", Icon_Type.Alert, Common.GetHomeBaseUrl("Default.aspx"));
            }
            else
            {
                EventMessage.MessageBox(1, "操作失败", string.Format("操作失败,返回值:{0}!", rInt), Icon_Type.Error, Common.GetHomeBaseUrl("Default.aspx"));
            }
        }
예제 #4
0
        /// <summary>
        /// 开始操作
        /// </summary>
        private void OnStart()
        {
            sys_PendingCommentEntity ut = BusinessFacadeDLT.sys_PendingCommentDisp(IDX);

            OnStartData(ut);
            switch (CMD)
            {
            case "New":
                TabOptionItem1.Tab_Name = HeadMenuWebControls1.HeadOPTxt = "增加sys_PendingComment";
                Hidden_Disp();
                break;

            case "List":
                TabOptionItem1.Tab_Name = HeadMenuWebControls1.HeadOPTxt = "查看sys_PendingComment";
                Hidden_Input();
                ButtonOption.Visible = false;
                AddEditButton();
                break;

            case "Edit":
                TabOptionItem1.Tab_Name = HeadMenuWebControls1.HeadOPTxt = "修改sys_PendingComment";
                Hidden_Disp();
                AddDeleteButton();
                break;

            case "Delete":
                ut.DataTable_Action_ = DataTable_Action.Delete;
                if (BusinessFacadeDLT.sys_PendingCommentInsertUpdateDelete(ut) > 0)
                {
                    EventMessage.MessageBox(1, "删除成功", string.Format("删除ID:{0}成功!", IDX), Icon_Type.OK, Common.GetHomeBaseUrl("Default.aspx"));
                }
                else
                {
                    EventMessage.MessageBox(1, "删除失败", string.Format("删除ID:{0}失败!", IDX), Icon_Type.Error, Common.GetHomeBaseUrl("Default.aspx"));
                }
                break;

            default:
                EventMessage.MessageBox(2, "不存在操作字符串!", "不存在操作字符串!", Icon_Type.Error, Common.GetHomeBaseUrl("Default.aspx"));
                break;
            }
        }
예제 #5
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            string Checkbox_Value = (string)Common.sink("Checkbox", MethodType.Post, 2000, 1, DataType.Str);

            string[] Checkbox_Value_Array = Checkbox_Value.Split(',');
            Int32    IDX = 0;

            for (int i = 0; i < Checkbox_Value_Array.Length; i++)
            {
                if (Int32.TryParse(Checkbox_Value_Array[i], out IDX))
                {
                    sys_PendingCommentEntity et = new sys_PendingCommentEntity();
                    et.DataTable_Action_ = DataTable_Action.Delete;
                    et.P_CommentID       = IDX;
                    BusinessFacadeDLT.sys_PendingCommentInsertUpdateDelete(et);
                }
            }

            EventMessage.MessageBox(1, "批量删除成功", string.Format("批量删除({0})成功!", Checkbox_Value), Icon_Type.OK, Common.GetHomeBaseUrl("default.aspx"));
        }