Exemplo n.º 1
0
        //提交
        protected void Button1_Click(object sender, EventArgs e)
        {
            string sid = txtid.Text.Trim();

            if (sid == "")
            {
                sid = "-1";
            }
            DataTable table = com.COM_Select("OA_ItemTB", "Id", "", sid, "", 4);

            if (table.Rows.Count != 0)
            {
                DataRow dr = table.Rows[0];
                dr["typeid"]    = typeid.SelectedValue.ToString();
                dr["titlename"] = titlename.Text.Trim();
                com.COM_Up(table, "OA_ItemTB", "typeid=@typeid,titlename=@titlename", sid);
                ok.Text = "修改成功!";
            }
            else
            {
                table.Rows.Clear();
                DataRow dr = table.NewRow();
                dr["typeid"]    = typeid.SelectedValue.ToString();
                dr["titlename"] = titlename.Text.Trim();
                table.Rows.Add(dr);
                com.COM_Add(table, "OA_ItemTB", "@typeid,@titlename");
                ok.Text = "添加成功!";
            }
            show();
            txtid.Text     = "";
            titlename.Text = "";
        }
Exemplo n.º 2
0
        //提交
        protected void Button1_Click(object sender, EventArgs e)
        {
            string sid = com.getsid("fid");
            string id  = com.getsid("id");

            DataTable table = com.COM_Select("OA_ItemTB", "Id", "", id, "", 4);

            if (table.Rows.Count != 0)
            {
                DataRow dr = table.Rows[0];
                dr["titlename"] = titlename.Text.Trim();
                com.COM_Up(table, "OA_ItemTB", "titlename=@titlename", id);
                Response.Write("<script>parent.location.href='Item.aspx'</script>");
            }
            else
            {
                if (sid != "-1")
                {
                    table.Rows.Clear();
                    DataRow dr = table.NewRow();
                    dr["titlename"] = titlename.Text.Trim();
                    dr["parentid"]  = sid;
                    dr["Isdelete"]  = 1;
                    table.Rows.Add(dr);
                    com.COM_Add(table, "OA_ItemTB", "@titlename,@parentid,@Isdelete");
                    Response.Write("<script>parent.location.href='Item.aspx'</script>");
                }
                else
                {
                    Label2.Text = "提交无效!";
                }
            }
        }
Exemplo n.º 3
0
        //修改
        protected void Button2_Click(object sender, EventArgs e)
        {
            Daiv_OA.BLL.URLENCRYP urlen = new Daiv_OA.BLL.URLENCRYP();
            DataTable             dt    = com.COM_Proc_Sel1("PC_getOA_email", UserId.ToString());
            string  sid = dt.Rows[0]["Id"].ToString();
            DataRow dr  = dt.Rows[0];

            dr["emailpwd"] = urlen.Encryp(emailpwd.Text.Trim());
            com.COM_Up(dt, "OA_emailTB", "emailpwd=@emailpwd", sid);
            Tools.Common.JavaScript.Redirect(Page, "修改成功!", "myemail.aspx");
        }
Exemplo n.º 4
0
        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            sid = com.getsid("address").ToString();
            DataTable dt = com.COM_Select("OA_Address", "Id", "", sid, "", 4); DataRow dr;

            if (sid != "-1")
            {
                dr = dt.Rows[0];
                drs(dr);
                com.COM_Up(dt, "OA_Address", "truename=@truename,phones=@phones,telephone=@telephone,email=@email,qq=@qq,Pids=@Pids", sid);
            }
            else
            {
                dr = dt.NewRow();
                drs(dr);
                dt.Rows.Add(dr);
                com.COM_Add(dt, "OA_Address", "@truename,@phones,@telephone,@email,@qq,@Pids");
            }
            go();
        }
Exemplo n.º 5
0
        /// <summary>
        /// 提交
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button2_Click(object sender, EventArgs e)
        {
            string    sid = com.getsid("sques");
            DataTable dt  = com.COM_Select("OA_QuestionTB", "Id", "", sid, "", 4);

            if (sid != "-1")
            {
                string user = getvalue(2);
                string u    = dt.Rows[0]["quuser"].ToString();
                if (user != u)
                {
                    antime.Text = DateTime.Now.ToString();
                }
                else
                {
                    uptime.Text = DateTime.Now.ToString();
                }
                DataRow dr = dt.Rows[0];
                DR(dr);
                com.COM_Up(dt, "OA_QuestionTB", Daiv_OA.BLL.Component.UpQuestion, sid);
                FinalMessage("提交成功!", "Squestion.aspx", 0);
            }
            else
            {
                if (getvalue(2) != touser.SelectedValue.ToString())
                {
                    quuser.Text = getvalue(2); inserttime.Text = DateTime.Now.ToString();
                    dt.Rows.Clear();
                    DataRow dr = dt.NewRow();
                    DR(dr);
                    dt.Rows.Add(dr);
                    com.COM_Add(dt, "OA_QuestionTB", Daiv_OA.BLL.Component.InQuestion);
                    FinalMessage("提交成功!", "Squestion.aspx", 0);
                }
                else
                {
                    Tools.Common.JavaScript.MessageBox(this, "当前解决人和发布人不能同时存在!");
                }
            }
        }
Exemplo n.º 6
0
        //提交打分
        protected void Button3_Click(object sender, EventArgs e)
        {
            Opposes = com.COM_Proc_Sel3("PC_CheckOpposes", ddlUname.SelectedValue.ToString(), intime, "1");
            //1验证是否存在打分记录
            if (ddlUname.SelectedValue != "0")
            {
                if (Opposes.Rows.Count != 0)//判读同周期下是否存在某角色已打分
                {
                    string statuis = Opposes.Rows[0]["statuis"].ToString();
                    #region 更新角色打分,统计
                    Opposes = com.COM_Proc_Sel3("PC_CheckOpposes", ddlUname.SelectedValue.ToString(), pids.ToString(), intime);
                    if (Opposes.Rows.Count == 0)
                    {
                        //更新打分
                        int c = 0;
                        for (int i = 0; i < gvlist.Rows.Count; i++)
                        {
                            GridView  gvlist2 = (GridView)gvlist.Rows[i].FindControl("GridView2");
                            string    sid     = gvlist.DataKeys[i].Value.ToString();//考核大栏目编号
                            DataTable table   = com.COM_Proc_Sel3("PC_GetOpposes", ddlUname.SelectedValue.ToString(), sid, intime);
                            for (int j = 0; j < table.Rows.Count; j++)
                            {
                                #region up  Opposes data
                                RadioButtonList rbl  = (RadioButtonList)gvlist2.Rows[j].FindControl("Radio");
                                string          ords = ((TextBox)(gvlist2.Rows[j].Cells[4].Controls[1])).Text.Trim();
                                if (rbl.SelectedValue.ToString() == "")
                                {
                                    com.COM_Proc_DelorUp_3("PC_Upall0pposes", ddlUname.SelectedValue.ToString(), intime, statuis);
                                    Tools.Common.JavaScript.MessageBox(this, "第 " + (i + 1) + " 模块下的第" + (j + 1) + "行的具体考核因素未选择,请重新选择!");
                                    return;
                                }
                                if (rbl.SelectedValue.ToString() == "20" || rbl.SelectedValue.ToString() == "0")
                                {
                                    if (ords == "")
                                    {
                                        com.COM_Proc_DelorUp_3("PC_Upall0pposes", ddlUname.SelectedValue.ToString(), intime, statuis);
                                        Tools.Common.JavaScript.MessageBox(this, "第 " + (i + 1) + " 模块下的第" + (j + 1) + "行的备注不能为空,请重新填写!");
                                        return;
                                    }
                                }
                                string id     = table.Rows[j]["Id"].ToString();//考核编号
                                string stsuid = table.Rows[j]["statuis"].ToString();
                                string rem    = table.Rows[j]["remrk"].ToString();
                                string column = "";

                                DataRow dr = table.Rows[0];
                                if (ords.Trim() != "")
                                {
                                    dr["remrk"] = rem + "|" + ords;
                                }
                                else
                                {
                                    dr["remrk"] = rem;
                                }
                                switch (pids)
                                {
                                case 1:
                                    dr["threescore"] = rbl.SelectedValue.ToString();
                                    column           = "threescore=@threescore";
                                    c += Convert.ToInt32(rbl.SelectedValue);
                                    break;

                                case 2:
                                    dr["twoscore"] = rbl.SelectedValue.ToString();
                                    column         = "twoscore=@twoscore";
                                    c += Convert.ToInt32(rbl.SelectedValue);
                                    break;

                                case 3:
                                    dr["onescore"] = rbl.SelectedValue.ToString();
                                    column         = "onescore=@onescore";
                                    c += Convert.ToInt32(rbl.SelectedValue);
                                    break;

                                case 4:
                                    dr["custom"] = rbl.SelectedValue.ToString();
                                    column       = "custom=@custom";
                                    c           += Convert.ToInt32(rbl.SelectedValue);
                                    break;
                                }
                                dr["statuis"] = stsuid + pids.ToString() + ",";
                                com.COM_Up(table, "OA_Opposes", "remrk=@remrk," + column + ",statuis=@statuis", id);
                                #endregion     // com.pkUpdate(Opposes, "OA_Opposes", "orderby=@orderby", gvlsit.DataKeys[jj].Value.ToString());//书卷编号);
                            }
                        }
                        Stats(c);
                        FinalMessage("打分成功!", "Scorelist.aspx", 0);
                    }
                    else
                    {
                        Tools.Common.JavaScript.Redirect(this, "您的角色已经打过分了,系统禁用重复打分,谢谢操作!", "Scorelist.aspx");
                    }
                    #endregion
                }
                else
                {
                    #region 插入打分,统计
                    int c = 0;
                    for (int i = 0; i < gvlist.Rows.Count; i++)
                    {
                        GridView gvlist2 = (GridView)gvlist.Rows[i].FindControl("GridView2");
                        string   sid     = gvlist.DataKeys[i].Value.ToString();//考核大栏目编号
                        for (int j = 0; j < gvlist2.Rows.Count; j++)
                        {
                            #region add  Opposes data
                            RadioButtonList rbl  = (RadioButtonList)gvlist2.Rows[j].FindControl("Radio");
                            string          ords = ((TextBox)(gvlist2.Rows[j].Cells[4].Controls[1])).Text.Trim();
                            if (rbl.SelectedValue.ToString() == "")
                            {
                                com.COM_Proc_DelorUp_2("PC_DelAll0pposes", ddlUname.SelectedValue.ToString(), intime);
                                Tools.Common.JavaScript.MessageBox(this, "第 " + (i + 1) + " 模块下的第" + (j + 1) + "行的具体考核因素未选择,请重新选择!");
                                return;
                            }
                            if (rbl.SelectedValue.ToString() == "20" || rbl.SelectedValue.ToString() == "0")
                            {
                                if (ords == "")
                                {
                                    com.COM_Proc_DelorUp_2("PC_DelAll0pposes", ddlUname.SelectedValue.ToString(), intime);
                                    Tools.Common.JavaScript.MessageBox(this, "第 " + (i + 1) + " 模块下的第" + (j + 1) + "行的备注不能为空,请重新填写!");
                                    return;
                                }
                            }
                            string id     = gvlist2.DataKeys[j].Value.ToString();//考核栏目编号
                            string column = "";
                            Opposes.Rows.Clear();
                            DataRow dr = Opposes.NewRow();
                            dr["Itemid"]   = id;
                            dr["parentid"] = sid;
                            dr["uid"]      = getvalue(1);
                            dr["intimes"]  = intime;
                            dr["remrk"]    = ords;
                            switch (pids)
                            {
                            case 1:
                                dr["threescore"] = rbl.SelectedValue.ToString();
                                column           = "@threescore";
                                c += Convert.ToInt32(rbl.SelectedValue);
                                break;

                            case 2:
                                dr["twoscore"] = rbl.SelectedValue.ToString();
                                column         = "@twoscore";
                                c += Convert.ToInt32(rbl.SelectedValue);
                                break;

                            case 3:
                                dr["onescore"] = rbl.SelectedValue.ToString();
                                column         = "@onescore";
                                c += Convert.ToInt32(rbl.SelectedValue);
                                break;

                            case 4:
                                dr["custom"] = rbl.SelectedValue.ToString();
                                column       = "@custom";
                                c           += Convert.ToInt32(rbl.SelectedValue);
                                break;
                            }
                            dr["touser"]  = ddlUname.SelectedValue.ToString();
                            dr["statuis"] = "," + pids.ToString() + ",";
                            Opposes.Rows.Add(dr);
                            com.COM_Add(Opposes, "OA_Opposes", "@Itemid,@parentid,@uid,@intimes,@remrk," + column + ",@touser,@statuis");
                            #endregion // com.pkUpdate(Opposes, "OA_Opposes", "orderby=@orderby", gvlsit.DataKeys[jj].Value.ToString());//书卷编号);
                        }
                    }
                    Stats(c);
                    // Tools.Common.JavaScript.Redirect(this, "打分成功!", "Scorelist.aspx");
                    FinalMessage("打分成功!", "Scorelist.aspx", 0);
                    #endregion
                }
            }
            else
            {
                Tools.Common.JavaScript.MessageBox(this, "禁用同时给所有用户打分!请重新选择用户,谢谢操作!");
            }
        }