コード例 #1
0
ファイル: TastCheck.aspx.cs プロジェクト: IvanFYJ/OA_MechStu
        /// <summary>
        /// 获得查询where
        /// </summary>
        /// <returns></returns>
        string GetWhere()
        {
            Daiv_OA.BLL.COMDLL com = new Daiv_OA.BLL.COMDLL();
            string             str = "Workprogress=3";
            string             id  = com.getsid("tast").ToString();

            if (id == "3")
            {
                str = "Workprogress=" + id.ToString();
            }
            else if (id == "9")
            {
                str = "Workprogress=9 and Manager=" + "'" + getvalue(2) + "'";
            }
            else if (id == "45678")
            {
                str  = "Workprogress in(4,5,6,7,8)";
                str += " and Manager=" + "'" + getvalue(2) + "'";
            }
            if (Tasktitle.Text.Trim() != "")
            {
                str += " and (Tasktitle like " + "'" + Tasktitle.Text.Trim() + "%')";
            }
            if (classse.SelectedValue.ToString() != "0")
            {
                str += " and classse=" + "'" + classse.SelectedValue.ToString() + "'";
            }
            return(str);
        }
コード例 #2
0
ファイル: ItemDetail.aspx.cs プロジェクト: IvanFYJ/OA_MechStu
 protected void Page_Load(object sender, EventArgs e)
 {
     User_Load("login");
     if (!IsPostBack)
     {
         string id = com.getsid("id");
         if (id != "-1")
         {
             DataTable table = com.COM_Select("OA_ItemTB", "Id", "", id, "", 4);
             if (table.Rows.Count != 0)
             {
                 titlename.Text = table.Rows[0]["titlename"].ToString();
             }
         }
     }
 }
コード例 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string sid            = com.getsid("id");
         Daiv_OA.BLL.TaskBLL s = new Daiv_OA.BLL.TaskBLL();
         if (sid != "-1")
         {
             DataTable dt = s.GetList("Tlid=" + sid).Tables[0];
             if (dt.Rows.Count != 0)
             {
                 Workprogress.SelectedValue = dt.Rows[0]["Workprogress"].ToString();
                 titlename.Text             = dt.Rows[0]["remark"].ToString();
             }
         }
     }
 }
コード例 #4
0
ファイル: address.aspx.cs プロジェクト: IvanFYJ/OA_MechStu
        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();
        }
コード例 #5
0
ファイル: Perdetail.aspx.cs プロジェクト: IvanFYJ/OA_MechStu
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DataDp();
         string id = com.getsid("Ponid");
         if (id != "-1")
         {
             DataTable table = com.COM_Select("OA_PersonalTB", "Id", "", id, "", 4);
             if (table.Rows.Count != 0)
             {
                 titlename.Text = table.Rows[0]["note"].ToString();
                 string[] str = table.Rows[0]["inserttime"].ToString().Split("-".ToCharArray());
                 //txtBegintime.Text=table.Rows[0]["inserttime"].ToString();
                 DropY.SelectedValue = str[0].ToString();
                 DropM.SelectedValue = str[1].ToString();
                 DropD.SelectedValue = str[2].ToString();
             }
         }
     }
 }
コード例 #6
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, "当前解决人和发布人不能同时存在!");
                }
            }
        }
コード例 #7
0
        void showdp()
        {
            Daiv_OA.BLL.COMDLL com = new Daiv_OA.BLL.COMDLL();
            int uid = Convert.ToInt32(com.getsid("fid"));

            if (uid != -1)
            {
                int dpid = new Daiv_OA.BLL.UserBLL().GetEntity(uid).Did;
                DropDownList1.SelectedValue       = dpid.ToString();
                DropDownList1.Enabled             = false;
                this.DropDownList2.DataSource     = new Daiv_OA.BLL.UserBLL().GetList("Did=" + DropDownList1.SelectedValue.ToString());
                this.DropDownList2.DataTextField  = "Uname";
                this.DropDownList2.DataValueField = "Uid";
                this.DropDownList2.DataBind();
                DropDownList2.SelectedValue = uid.ToString();
                DropDownList2.Enabled       = false;
            }
            else
            {
                DropDownList1.Enabled = true;
                DropDownList2.Enabled = true;
            }
        }
コード例 #8
0
ファイル: TastCheck.aspx.cs プロジェクト: IvanFYJ/OA_MechStu
        protected void Show()
        {
            Daiv_OA.BLL.COMDLL com = new Daiv_OA.BLL.COMDLL();
            string             id  = com.getsid("tast").ToString();

            switch (id)
            {
            case "-1":
                gvlist.Visible = false; AspNetPager1.Visible = false;
                break;

            case "3":
                gvlist.Columns[7].Visible = false; gvlist.Columns[9].Visible = false; gvlist.Columns[4].Visible = false;
                break;

            case "9":
                gvlist.Columns[5].Visible = false;
                break;

            case "45678":
                gvlist.Columns[7].Visible = false; gvlist.Columns[8].Visible = false;
                break;
            }
        }
コード例 #9
0
        protected void gvlist_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            int num = 0;

            //
            if (e.Row.RowIndex != -1)
            {
                int id = e.Row.RowIndex + 1;
                e.Row.Cells[0].Text = id.ToString();
            }
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                #region 行事件
                string   fid     = gvlist.DataKeys[e.Row.RowIndex].Value.ToString().Trim();
                GridView gvlist3 = (GridView)e.Row.FindControl("GridView2");
                if (fid != "")
                {
                    Daiv_OA.BLL.COMDLL com = new Daiv_OA.BLL.COMDLL();
                    DataTable          dt  = com.COM_Select("OA_ItemTB", "parentid", "Isdelete", fid, "1", 8);
                    gvlist3.DataSource = dt; gvlist3.DataBind();
                    if (com.getsid("uid") != "-1" && com.getsid("kq") != "-1")
                    {
                        DataTable ds = com.COM_Proc_Sel3("Pc_SelOpposebyPTI", fid, com.getsid("uid"), com.getsid("kq"));
                        for (int i = 0; i < ds.Rows.Count; i++)
                        {
                            Label lb = (Label)gvlist3.Rows[i].FindControl("lbtxt");
                            switch (getvalue(4))
                            {
                            case "1":
                                lb.Text = ds.Rows[i]["threescore"].ToString();
                                break;

                            case "2":
                                lb.Text = ds.Rows[i]["twoscore"].ToString();
                                break;

                            case "3":
                                lb.Text = ds.Rows[i]["onescore"].ToString();
                                break;

                            case "4":
                                lb.Text = ds.Rows[i]["custom"].ToString();
                                break;
                            }
                            num += Convert.ToInt32(lb.Text.Trim());
                            TextBox txt = (TextBox)gvlist3.Rows[i].FindControl("txtremark");
                            txt.Text = ds.Rows[i]["remrk"].ToString();
                        }
                    }
                }
                #endregion
                Label lbtxt = (Label)e.Row.FindControl("labnum");
                lbtxt.Text = num.ToString();
                Snum      += num;
            }

            // 合计
            if (e.Row.RowType == DataControlRowType.Footer)
            {
                e.Row.Cells[3].Text = "合计您给的总分:<font style=\"color:red\">" + Snum.ToString() + "</font>";
            }
        }