Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string lsyear = "";

        if (this.Request.QueryString["lsyear"] != null)
        {
            lsyear = this.Request.QueryString["lsyear"].ToString();
        }
        HyoaClass.DAO db = new HyoaClass.DAO();
        //本年已年休天数
        string lssql1 = "select sum(convert(float,hy_field2) ) from hyp_flowmain where hy_mudelid='qjsq' and hy_tableid='d4af25f1-c7c0-4df9-a3b4-2c968ec3f2bc' and hy_curtacheid='**' and hy_field1='年休假' and hy_djrid='" + this.Session["hyuid"].ToString() + "' and hy_field3='"+lsyear+"'";
        //可年休天数
        string lssql2 = "select hy_field36 from hyp_flowmain where hy_mudelid='modulenxjwh' and hy_tableid='ed3f3e1b-1c2c-49b4-91de-5bcc35b83ffa' and hy_field1='" + this.Session["hyuid"].ToString() + "' and hy_field3='" + lsyear + "'";
        DataTable dt1 = db.GetDataTable(lssql1);
        DataTable dt2 = db.GetDataTable(lssql2);

        string lsstr1 = "0";
        string lsstr2 = "0";
        if (dt1.Rows.Count > 0)
        {
            lsstr1 = dt1.Rows[0][0].ToString();
        }
        if (dt2.Rows.Count > 0)
        {
            lsstr2 = dt2.Rows[0][0].ToString();
        }

        this.Response.Write(lsstr1 + "#" + lsstr2);

        //return ;
    }
Esempio n. 2
0
    //获取投票数量的比例
    public string GetItemproportion(string pis_xxid, Boolean bl)
    {
        string rValue;
        HyoaClass.DAO db = new HyoaClass.DAO();

        //总参与投票数
        double ls_tpall;
        string ls_sql1 = " Select * from hyk_whzx_tpgl_tpmx where hy_tpztid ='" + this.txtdocid.Value + "' ";
        DataTable dt1 = db.GetDataTable(ls_sql1);
        ls_tpall = dt1.Rows.Count;

        //得到某一个选项投票数
        double ls_tpxx;
        string ls_sql2 = " Select * from hyk_whzx_tpgl_tpmx where hy_tpztid ='" + this.txtdocid.Value + "' and hy_tpxxid ='" + pis_xxid + "' ";
        DataTable dt2 = db.GetDataTable(ls_sql2);
        ls_tpxx = dt2.Rows.Count;

        double ls_num = 0.0;
        if (ls_tpxx != 0)
        {
            ls_num = (ls_tpxx / ls_tpall) * 100;
        }
        if (bl)
        {
            rValue = ls_num.ToString("#0.#0") + "%";
        }
        else
        {
            rValue = ls_num.ToString("#0.#0");
        }
        dt1.Clear();
        dt2.Clear();
        db.Close();
        return rValue;
    }
Esempio n. 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string lsyear = "";

        if (this.Request.QueryString["lsyear"] != null)
        {
            lsyear = this.Request.QueryString["lsyear"].ToString();
        }
        HyoaClass.DAO db = new HyoaClass.DAO();
        //本年已加班天数
        string lssql1 = "select sum(convert(float,hy_field16)) from hyp_flowmain where hy_mudelid='jbsq' and ";
        lssql1 += " hy_tableid='c980c86b-da0c-4758-b3d8-7236240c77da' and hy_curtacheid='**' and ";
        lssql1 += " hy_djrid='" + this.Session["hyuid"].ToString() + "' and datename(year,hy_field31)='" + lsyear + "'";
        //已调休天数
        string lssql2 = "select sum(convert(float,hy_field2)) from hyp_flowmain where hy_mudelid='qjsq' and ";
        lssql2 += " hy_tableid='d4af25f1-c7c0-4df9-a3b4-2c968ec3f2bc' and hy_curtacheid='**' and hy_field1='调休' and ";
        lssql2 += " hy_djrid='" + this.Session["hyuid"].ToString() + "' and hy_field3='" + lsyear + "'";
        DataTable dt1 = db.GetDataTable(lssql1);
        DataTable dt2 = db.GetDataTable(lssql2);

        string lsstr1 = "0";
        string lsstr2 = "0";
        if (dt1.Rows.Count > 0)
        {
            lsstr1 = dt1.Rows[0][0].ToString();
        }
        if (dt2.Rows.Count > 0)
        {
            lsstr2 = dt2.Rows[0][0].ToString();
        }

        this.Response.Write(lsstr1 + "#" + lsstr2);

        //return ;
    }
Esempio n. 4
0
 //部门信息得分
 public string GetDF(string deptname)
 {
     string ls_temp = deptname;
     string lsif = "";
     HyoaClass.DAO db = new HyoaClass.DAO();
     if (this.hy_djsj_start_1.Value != "")
     {
         lsif += "  and CONVERT(varchar(10), hy_field31, 120)>='" + this.hy_djsj_start_1.Value + "' ";
     }
     if (this.hy_djsj_end_1.Value != "")
     {
         lsif += "   and CONVERT(varchar(10), hy_field31, 120)<='" + this.hy_djsj_end_1.Value + "' ";
     }
     string strSelect = "select * from hyt_user d left join  hyp_flowmain m on d.hy_username=m.hy_field6 left  join hyt_dept n on n.hy_deptid=d.hy_deptid  where m.hy_mudelid='xxgl' and m.hy_tableid='f1265875-5494-465f-ac33-6fa43d208c8f'  " + lsif + " and n.hy_deptname='" + ls_temp + "' order by d.hy_deptid,d.hy_sort";
     double tt = 0;
     DataTable dt = db.GetDataTable(strSelect);
     if (dt.Rows.Count != 0)
     {
         for (int i = 0; i < dt.Rows.Count; i++)
         {
             tt += double.Parse(dt.Rows[i]["hy_field9"].ToString());
         }
     }
     return tt.ToString();
 }
Esempio n. 5
0
    protected void btnscsj_Click_gzjcb(object sender, EventArgs e)
    {
        //工作检查表
        HyoaClass.DAO db = new HyoaClass.DAO();
        string sql = "select * from hyp_flowmain where hy_mudelid='djgz' and hy_tableid='0e5efe98-49a5-4ccd-9532-8cac74ab328d' ";
        if (this.hy_field9_1.Value != "")
            sql += " and hy_field9 like '%" + this.hy_field9_1.Value + "%' ";

        if (this.hy_djsj_start_1.Value != "")
            sql += " and  CONVERT(varchar(10),hy_field31,120) >= '" + this.hy_djsj_start_1.Value + "' ";

        if (this.hy_djsj_end_1.Value != "")
            sql += " and  CONVERT(varchar(10),hy_field31,120) <= '" + this.hy_djsj_end_1.Value + "' ";

        sql += "  and (hy_field8='委员会' or hy_field8='党员大会' or hy_field8='党课' or hy_field8='其它组织生活') order by hy_field31 asc ";

        //this.Response.Write(sql);
        DataTable dt = db.GetDataTable(sql);
        string lsstr = "";
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            lsstr += (i + 1).ToString() + "~" + System.DateTime.Parse(dt.Rows[i]["hy_field31"].ToString()).ToShortDateString() + "~" + dt.Rows[i]["hy_field7"].ToString();
            lsstr += "~" + dt.Rows[i]["hy_field37"].ToString() + "~" + dt.Rows[i]["hy_field38"].ToString() + "~" + dt.Rows[i]["hy_field8"].ToString() + ":" + dt.Rows[i]["hy_bt"].ToString();
            lsstr += "#*";
        }
        this.hy_count.Text = dt.Rows.Count.ToString();
        this.hy_scsj.Text = lsstr;
        this.Response.Write("<script>alert('生成完成,请点击导出按钮!');</script>");
    }
Esempio n. 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string ls_mudelid="";
        string ls_tableid = "";
        string ls_value = "";

        if (this.Request.QueryString["mudelid"] != null)
        {
            ls_mudelid = this.Request.QueryString["mudelid"].ToString();
        }
        if (this.Request.QueryString["tableid"] != null)
        {
            ls_tableid = this.Request.QueryString["tableid"].ToString();
        }
        if (this.Request.QueryString["lsvalue"] != null)
        {
            ls_value = this.Request.QueryString["lsvalue"].ToString();  //物品名称
        }

        HyoaClass.DAO db = new HyoaClass.DAO();
        string lssql = "select hy_field3 from hyp_flowmain where hy_mudelid='" + ls_mudelid + "' and hy_tableid='" + ls_tableid + "' and hy_field2='" + ls_value + "'";
        DataTable dt = db.GetDataTable(lssql);

        this.Response.Write(dt.Rows[0]["hy_field3"].ToString());

        //return ;
    }
Esempio n. 7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string ls_value1 = "";
        string ls_value2 = "";

        if (this.Request.QueryString["lsvalue1"] != null)
        {
            ls_value1 = this.Request.QueryString["lsvalue1"].ToString();  //类别
        }
        if (this.Request.QueryString["lsvalue2"] != null)
        {
            ls_value2 = this.Request.QueryString["lsvalue2"].ToString();  //年份
        }
        //Response.Write(ls_value2);
        HyoaClass.DAO db = new HyoaClass.DAO();
        string lssql = "select hy_field37 from hyp_flowmain where hy_mudelid='Mudellsh' and hy_field1='" + ls_value1 + "' and hy_field2='" + ls_value2 + "' order by hy_field36";
        //Response.Write(lssql);
        DataTable dt = db.GetDataTable(lssql);
        if (dt.Rows.Count > 0)
        {
            this.Response.Write(dt.Rows[0][0].ToString());
        }
        else
        {
            this.Response.Write("1");
        }
    }
Esempio n. 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() =="")
            this.Response.Redirect("/login.aspx");

        if (!IsPostBack)
        {

            string lstr = "";
            HyoaClass.DAO db = new HyoaClass.DAO();
            string lssql = "select * from hyp_flowmain where hy_mudelid = 'clgl' and hy_tableid='0b5c53fe-114b-4fa3-8b59-4163b3053504'";
            if (this.Request.QueryString["startdate"] != null)
            {
                if (this.Request.QueryString["startdate"].ToString() != "")
                {
                    lssql += " and hy_field31>='" + this.Request.QueryString["startdate"].ToString() + "'";
                }
            }
            if (this.Request.QueryString["enddate"] != null)
            {
                if (this.Request.QueryString["enddate"].ToString() != "")
                {
                    lssql += " and hy_field31<='" + this.Request.QueryString["enddate"].ToString() + "'";
                }
            }
            if (this.Request.QueryString["hy_field1"] != null)
            {
                if (this.Request.QueryString["hy_field1"].ToString() != "")
                {
                    lssql += " and hy_field1 like '%" + this.Request.QueryString["hy_field1"].ToString() + "%'";
                }
            }
            lssql += " order by hy_field31 desc";
            DataTable dt = db.GetDataTable(lssql);

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                lstr += "<TR >";
                lstr += "<td >" + dt.Rows[i]["hy_field1"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field2"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field3"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field4"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field5"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field6"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field7"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field8"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field9"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field10"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field11"].ToString() + "</td>";
                lstr += "<td >" + dt.Rows[i]["hy_field12"].ToString() + "</td>";
                lstr += "</tr>";
            }

            this.lbltr.Text = lstr;
            db.Close();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string ls_mudelid="";
        string ls_tableid = "";
        string ls_value = "";

        if (this.Request.QueryString["mudelid"] != null)
        {
            ls_mudelid = this.Request.QueryString["mudelid"].ToString();
        }
        if (this.Request.QueryString["tableid"] != null)
        {
            ls_tableid = this.Request.QueryString["tableid"].ToString();
        }
        if (this.Request.QueryString["lsvalue"] != null)
        {
            ls_value = this.Request.QueryString["lsvalue"].ToString();  //物品名称
        }

        HyoaClass.DAO db = new HyoaClass.DAO();
        //string lssql = "select b.hy_deptname,a.hy_officetel,a.hy_mobile,a.hy_virtualnumber,a.hy_userid,a.hy_post,a.hy_hometel  from hyt_user as a ,hyt_dept as b where a.hy_username='******' and a.hy_deptid=b.hy_deptid";
        string lssql = "select * from hyt_user as a ,hyt_dept as b where a.hy_username='******' and a.hy_deptid=b.hy_deptid";
        DataTable dt = db.GetDataTable(lssql);
        if (dt.Rows.Count > 0)
        {
            string lssql2 = "select * from hyt_user_detail where hy_userid='" + dt.Rows[0]["hy_userid"].ToString() + "'";
            DataTable dt2 = db.GetDataTable(lssql2);
            if (dt2.Rows.Count > 0)
            {
                this.Response.Write(dt.Rows[0]["hy_deptname"].ToString() + "#" + dt.Rows[0]["hy_officetel"].ToString() + "#" + dt.Rows[0]["hy_mobile"].ToString() + "#" + dt.Rows[0]["hy_virtualnumber"].ToString() + "#" + dt.Rows[0]["hy_userid"].ToString() + "#" + dt.Rows[0]["hy_post"].ToString() + "#" + dt.Rows[0]["hy_hometel"].ToString() + "#" + dt2.Rows[0]["hy_xb"].ToString() + "#" + dt2.Rows[0]["hy_zzmm"].ToString() + "#" + dt2.Rows[0]["hy_xl"].ToString());
            }
            else
            {
                this.Response.Write(dt.Rows[0]["hy_deptname"].ToString() + "#" + dt.Rows[0]["hy_officetel"].ToString() + "#" + dt.Rows[0]["hy_mobile"].ToString() + "#" + dt.Rows[0]["hy_virtualnumber"].ToString() + "#" + dt.Rows[0]["hy_userid"].ToString() + "#" + dt.Rows[0]["hy_post"].ToString() + "#" + dt.Rows[0]["hy_hometel"].ToString() + "###");
            }
        }
        else
        {
            this.Response.Write("");
        }
        db.Close();
        //return ;
    }
Esempio n. 10
0
    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("/login.aspx");

        string ls_tip = "保存成功!";

        //新文档时
        string lscolunid = "", sql = "";
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        HyoaClass.DAO db = new HyoaClass.DAO();

        if (this.txtselcolid.Value =="")
        {
            Response.Write("<script>alert('请选择查询的字段!');window.location.href = window.location.href;</script>");
            return;
        }

        if (this.txtop.Value == "add")
        {
            //判断是否重复
            string sql1 = "select * from hyt_searchconfig where hy_mudelid='" + this.ddlmudelid.SelectedValue + "' and hy_tableid='" + this.ddltableid.SelectedValue + "'";
            DataTable dt = db.GetDataTable(sql1);
            if (dt.Rows.Count > 0)
            {
                Response.Write("<script>alert('该模块已添加,请修改!');window.location.href = window.location.href;</script>");
                return;
            }

            lscolunid = Hyoa_global.GetRandom();
            sql = "insert into hyt_searchconfig (ID,hy_mudelid,hy_tableid,hy_sort,hy_columnshowid,hy_columnshow,hy_ifsearch,hy_xszdid,hy_xszd,hy_kckry,hy_kckryid) values (";
            sql += "'" + lscolunid + "','" + this.ddlmudelid.SelectedValue + "','" + this.ddltableid.SelectedValue + "'," + float.Parse(this.txtsort.Text) + "";
            sql += ",'" + this.txtselcolid.Value + "','" + this.txtselcol.Value + "','" + this.ddlifsearch.SelectedValue + "'";
            sql += ",'" + this.txtselsearchid.Value + "','" + this.txtselsearch.Value + "','" + this.hy_field41_1.Value + "','" + this.hy_field43_1.Value + "')";
            db.Execute(sql);
        }
        else
        {
            sql = "update hyt_searchconfig  set hy_mudelid='" + this.ddlmudelid.SelectedValue + "', hy_tableid='" + this.ddltableid.SelectedValue + "',";
            sql += "hy_sort=" + float.Parse(this.txtsort.Text) + ",hy_columnshowid='" + this.txtselcolid.Value + "',hy_columnshow='" + this.txtselcol.Value + "',";
            sql += " hy_ifsearch='" + this.ddlifsearch.SelectedValue + "',hy_xszdid='" + this.txtselsearchid.Value + "',hy_xszd='" + this.txtselsearch.Value + "', ";
            sql += " hy_kckry='" + this.hy_field41_1.Value + "',hy_kckryid='" + this.hy_field43_1.Value + "' where ID='" + this.txtdocid.Value + "'";
            db.Execute(sql);
        }
        db.Close();
        //处理完成后的提示及跳转
        if (this.txtifpop.Value == "")
        {
            Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
        }
        else
        {
            Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
        }
    }
Esempio n. 11
0
    private void DataPlay(int PageNo)
    {
        //得到当前页号
        HyoaClass.DAO db = new HyoaClass.DAO();
        string sql = "";
        sql = "select * from hyp_flowmain where hy_mudelid='clgl' and hy_tableid='a7c3875f-d6c8-4c9d-819b-e5e84a6bd79f'  ";

        sql += " order by hy_field1 ";

        DataTable dt = db.GetDataTable(sql);
        DataTable tempTable = dt.Clone();

        DataColumn col1 = new DataColumn("lcs", typeof(String));
        tempTable.Columns.Add(col1);

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            DataRow dr = tempTable.NewRow();
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                dr[dt.Columns[j].ColumnName] = dt.Rows[i][j];
            }
            //根据车牌号去查找这辆车的里程数的记录
            string lsdateend;
            string ls_sqllc = "select sum(hy_field36) from hyp_flowmain where hy_mudelid='clgl' and hy_tableid='8b10b316-98d6-4a50-bc15-52745bb119bb' and hy_field5='" + dt.Rows[i]["hy_field1"].ToString()+"' ";
            if (this.hy_djsj_start_1.Value!="")
            {
                ls_sqllc = ls_sqllc + " and hy_djsj>='" + this.hy_djsj_start_1.Value + "' ";
            }
            if (this.hy_djsj_end_1.Value != "")
            {
                lsdateend = this.hy_djsj_end_1.Value;
                DateTime dts = Convert.ToDateTime(lsdateend);
                DateTime date_effect = dts.AddDays(1);//加一天
                ls_sqllc = ls_sqllc + " and hy_djsj<='" + date_effect.ToString("yyyy-MM-dd").ToString() + "' ";
            }

            DataTable dt_gettoday = db.GetDataTable(ls_sqllc);
            if (dt_gettoday.Rows.Count > 0)
            {
                dr["lcs"] = dt_gettoday.Rows[0][0];
            }
            tempTable.Rows.Add(dr);
        }

        DataView dv = new DataView();
        dv.Table = tempTable;

        int TotalRecord = dt.Rows.Count;
        this.sumts.Text = TotalRecord.ToString();
        this.sumts2.Text = TotalRecord.ToString();
        this.rptlist.DataSource = dv;
        this.rptlist.DataBind();
        dt.Clear();
    }
Esempio n. 12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() =="")
            this.Response.Redirect("/login.aspx");

        if (!IsPostBack)
        {
            if (this.Request.QueryString["mid"] != null)
            {
                this.txtmudelid.Value = Request.QueryString["mid"].ToString();
            }
            else
            {
                this.Response.Write("<script>alert('模块ID没有传入,请联系管理员!');</script>");
                return;
            }

            if (this.Request.QueryString["tableid"] != null)
            {
                this.txttableid.Value = Request.QueryString["tableid"].ToString();
            }
            else
            {
                this.Response.Write("<script>alert('表单ID没有传入,请联系管理员!');</script>");
                return;
            }

            //加车牌号下拉信息
            HyoaClass.DAO clgldb = new HyoaClass.DAO();
            string lsclglsql = "select hy_field1 from hyp_flowmain where hy_mudelid='clgl' and hy_tableid='a7c3875f-d6c8-4c9d-819b-e5e84a6bd79f'";
            DataTable dtclgl = clgldb.GetDataTable(lsclglsql);

            if (dtclgl.Rows.Count > 0)
            {
                this.hy_field1_1.DataSource = dtclgl;
                this.hy_field1_1.DataTextField = "hy_field1";
                this.hy_field1_1.DataValueField = "hy_field1";
                this.hy_field1_1.DataBind();
                this.hy_field1_1.Items.Insert(0, new ListItem("", ""));
                this.hy_field1_1.SelectedIndex = 0;
                //this.ddlmudelid.Items.Insert(0, new ListItem(lsmudel, lsmudelid));
            }
            //经费类别下拉信息
            this.hy_field3_1.Items.Insert(0, "");
            this.hy_field3_1.Items.Insert(1, "保养经费");
            this.hy_field3_1.Items.Insert(2, "维护经费");
            this.hy_field3_1.Items.Insert(3, "汽油经费");

            this.txturl.Text = this.Request.RawUrl;
            DataPlay(1);
        }
    }
Esempio n. 13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     string ls_temp = "";
     if (this.Request.QueryString["ls_txtdocid"] != null)
     {
         ls_temp = this.Request.QueryString["ls_txtdocid"].ToString();
     }
     HyoaClass.DAO db = new HyoaClass.DAO();
     string sql = "select * from hyp_flowmain where hy_mudelid='rsgl' and hy_tableid='6047076e-6a95-4fb8-aec8-5551d3900590' and docid='" + ls_temp + "'";
     DataTable dt = db.GetDataTable(sql);
     if (dt.Rows.Count > 0)
     {
         this.Response.Write(dt.Rows[0]["hy_field11"].ToString());
     }
 }
Esempio n. 14
0
 //判断是否已经投票过
 public string pdsftpg(string pis_id)
 {
     string rValue = "<font color='red'>我要投票</font>";
     HyoaClass.DAO db = new HyoaClass.DAO();
     string sql1 = "select * from hyk_whzx_tpgl_tpmx where hy_tpztid='" + pis_id + "' and  hy_tprid='" + this.Session["hyuid"].ToString() + "'  ";
     DataTable dt = db.GetDataTable(sql1);
     if (dt.Rows.Count > 0)
     {
         rValue = "已投票";
     }
     string sql2 = "select * from hyk_whzx_tpgl where id='" + pis_id + "'";
     DataTable dt2 = db.GetDataTable(sql2);
     if (dt2.Rows.Count > 0)
     {
         if (dt2.Rows[0]["hy_gjzt"].ToString() == "结束投票")
         {
             rValue = "<font color='bule'>结束投票</font>";
         }
     }
     dt.Clear();
     dt2.Clear();
     db.Close();
     return rValue;
 }
Esempio n. 15
0
    private void DataPlay()
    {
        HyoaClass.DAO db = new HyoaClass.DAO();
        string ls_html = "";
        float ls_sum = 0;
        String[] v_ids = this.txtids.Value.Split(',');
        for (var i = 0; i < v_ids.Length; i++)
        {
            //根据ID得到信息
            string ls_sql = "select * from hyp_flowmain where DOCID='" + v_ids[i] + "'";
            DataTable dt = db.GetDataTable(ls_sql);

            if (dt.Rows.Count > 0)
            {
                string ls_spyj = dt.Rows[0]["hy_content2"].ToString();
                ls_spyj = ls_spyj.Replace("<br>","");
                ls_spyj = ls_spyj.Replace("&nbsp;", " ");
                //ls_spyj = ls_spyj.Replace("&#160;", "");
                ls_spyj = ls_spyj.Replace(")", ")<br>");
                string ls_spyj2 = dt.Rows[0]["hy_content3"].ToString();
                ls_spyj2 = ls_spyj2.Replace("<br>", "");
                ls_spyj2 = ls_spyj2.Replace("&nbsp;", " ");
                //ls_spyj = ls_spyj.Replace("&#160;", "");
                ls_spyj2 = ls_spyj2.Replace(")", ")<br>");

                ls_html += "<tr onMouseOver=\"this.className='tr-over'\" onmouseout=\"this.className='TrList_ciq'\" class=\"TrList_ciq\">";
                ls_html += "<td width=\"5%\" height=\"28\" align=\"center\">" + (i + 1) + "</td>";
                ls_html += "<td width=\"8%\" align=\"center\">" + dt.Rows[0]["hy_djrname"].ToString() + "</td>";
                ls_html += "<td width=\"8%\" align=\"center\">" + dt.Rows[0]["hy_djrbmname"].ToString() + "</td>";
                ls_html += "<td width=\"8%\" align=\"center\">" + DateTime.Parse(dt.Rows[0]["hy_djsj"].ToString()).ToString("yyyy-MM-dd") + "</td>";
                ls_html += "<td width=\"8%\" align=\"center\">" + dt.Rows[0]["hy_field16"].ToString() + "</td>";
                ls_html += "<td width=\"8%\" align=\"center\">" + dt.Rows[0]["hy_bt"].ToString() + "</td>";
                ls_html += "<td width=\"8%\" align=\"center\">" + dt.Rows[0]["hy_field1"].ToString() + "</td>";
                ls_html += "<td width=\"8%\" align=\"center\">" + dt.Rows[0]["hy_field99"].ToString() + "</td>";
                ls_html += "<td width=\"12%\" align=\"center\">" + dt.Rows[0]["hy_content1"].ToString() + "</td>";
                ls_html += "<td width=\"27%\" align=\"left\">" + ls_spyj + ls_spyj2 + "</td>";
                ls_html += "</tr>";
                ls_sum += float.Parse(dt.Rows[0]["hy_field99"].ToString());
            }
        }

        this.lblsum.Text = "合计总额:" + ls_sum.ToString("f2");
        this.lblhtml.Text = ls_html;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string ls_value = "";
        if (this.Request.QueryString["lsvalue"] != null)
        {
            ls_value = this.Request.QueryString["lsvalue"].ToString();
        }

        HyoaClass.DAO db = new HyoaClass.DAO();
        string lssql = "select * from hyt_user as a ,hyt_dept as b where a.hy_username='******' and a.hy_deptid=b.hy_deptid";
        DataTable dt = db.GetDataTable(lssql);
        string ls_str = "";
        if (dt.Rows.Count > 0)
        {
            ls_str = dt.Rows[0]["hy_deptname"].ToString() + "," + dt.Rows[0]["hy_deptid"].ToString();
        }
        this.Response.Write(ls_str);
        db.Close();
    }
Esempio n. 17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //生成省侨办的用户及密码

            HyoaClass.DAO db = new HyoaClass.DAO();
            String lssql = "select * from hyt_user where 1=1 order by hy_userid";
            DataTable dt = db.GetDataTable(lssql);
            this.Response.Write("<table border='1'>");
            Random Random1 = new Random();
            int i1;
            String lspassword = "";
            String lssqlupdate = "";
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                this.Response.Write("<tr>");
                this.Response.Write("<td>");
                this.Response.Write("登录名");
                this.Response.Write("</td>");
                this.Response.Write("<td>");
                this.Response.Write(dt.Rows[i]["hy_userid"].ToString());
                this.Response.Write("</td>");
                this.Response.Write("<td>");
                this.Response.Write("中文名");
                this.Response.Write("</td>");
                this.Response.Write("<td>");
                this.Response.Write(dt.Rows[i]["hy_username"].ToString());
                this.Response.Write("</td>");
                this.Response.Write("<td>");
                this.Response.Write("密码");
                this.Response.Write("</td>");
                this.Response.Write("<td>");
                i1 = Random1.Next(100000, 999999);
                this.Response.Write(i1.ToString());
                this.Response.Write("</td>");
                this.Response.Write("</tr>");

                lspassword = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(i1.ToString(), "MD5");
                lssqlupdate = "update hyt_user set hy_pwd='" + lspassword + "' where hy_userid='" + dt.Rows[i]["hy_userid"].ToString() + "'";
                db.Execute(lssqlupdate);

            }
            this.Response.Write("</table>");
    }
Esempio n. 18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        HyoaClass.DAO db = new HyoaClass.DAO();
        string lssql = "select hy_field1  from hyp_flowmain where hy_mudelid='grtxl_fl' and hy_tableid='c1d7829d-ce46-498c-bec9-f0cc84c39c4a' and hy_djrid='" + this.Session["hyuid"].ToString() + "' order by hy_field2 asc";
        DataTable dt = db.GetDataTable(lssql);
        string ls_return = "";
        if (dt.Rows.Count > 0)
        {
            for(var i=0;i<dt.Rows.Count;i++)
            {
                if (ls_return == "")
                    ls_return = dt.Rows[i][0].ToString();
                else
                    ls_return += ","+dt.Rows[i][0].ToString();
            }
        }
        this.Response.Write(ls_return);

        //return ;
    }
Esempio n. 19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string ls_mudelid="";
        string ls_tableid = "";
        string ls_value = "";

        if (this.Request.QueryString["mudelid"] != null)
        {
            ls_mudelid = this.Request.QueryString["mudelid"].ToString();
        }
        if (this.Request.QueryString["tableid"] != null)
        {
            ls_tableid = this.Request.QueryString["tableid"].ToString();
        }
        if (this.Request.QueryString["lsvalue"] != null)
        {
            ls_value = this.Request.QueryString["lsvalue"].ToString();  //物品名称
        }

        HyoaClass.DAO db = new HyoaClass.DAO();
        string lssql = "select hy_field37,hy_field38 from hyp_flowmain where hy_mudelid='" + ls_mudelid + "' and hy_tableid='" + ls_tableid + "' and hy_field1='" + ls_value + "'";
        DataTable dt = db.GetDataTable(lssql);

        //是否包含小数点,包含的话,取小数点后两位
        string lsgetputfiled;  //价格(单价
        if (dt.Rows[0][0].ToString().Contains(".") == true)
        {
            lsgetputfiled = float.Parse(dt.Rows[0][0].ToString()).ToString("F2");
        }
        else
        {
            lsgetputfiled = float.Parse(dt.Rows[0][0].ToString()).ToString();
        }

        this.Response.Write(lsgetputfiled + "," + dt.Rows[0][1].ToString());

        //return ;
    }
Esempio n. 20
0
    //添加候选项
    protected void btn_add1_Click(object sender, EventArgs e)
    {
        HyoaClass.DAO db = new HyoaClass.DAO();
        string ls_sql = "";
        int ls_sort = 1;
        //通过问卷题目ID得到最大排序号
        ls_sql = "select max(hy_sort) as hy_sort,count(*) as num from hyk_whzx_tpgl_tpxx where hy_tpztid='" + this.txtdocid.Value + "' order by hy_sort desc ";
        DataTable dt = db.GetDataTable(ls_sql);
        if (dt.Rows[0]["num"].ToString() != "0")
        {
            ls_sort = System.Int32.Parse(dt.Rows[0]["hy_sort"].ToString()) + 1;
        }
        dt.Clear();
        ls_sql = "insert into hyk_whzx_tpgl_tpxx (id,hy_tpztid,hy_tpxxmc,hy_sort) values (";
        ls_sql += "'" + System.Guid.NewGuid().ToString() + "','" + this.txtdocid.Value + "','" + this.hy_hxx.Value + "'," + ls_sort + "";
        ls_sql += ")";
        db.Execute(ls_sql);

        savetj("准备投票");

        //处理完成后的提示及跳转(增加刷新候选项功能)
        Response.Write("<script>window.location='main_tpgl.aspx?op=modify&id=" + this.txtdocid.Value + "&url=" + this.txturl.Value + "'</script>");
    }
Esempio n. 21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if(Request.QueryString["key"]!=null)
        {
            string ls_key = "";
            ls_key = Request.QueryString["key"].ToString();
            DataTable dt;
            string sql = "select * from hyt_user where hy_userid like '%" + ls_key + "%'";
            HyoaClass.DAO db = new HyoaClass.DAO();
            dt = db.GetDataTable(sql);

            string ls_name = "";
            this.Response.Write("<div align=left id=sampleLayer style=\"position:absolute; top:130px; left:240px; width:250px; height:100px; background:#EEEEEE; overflow:scroll; border: 1px solid #919191; font-family:Verdana; font-size:8pt\">");
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                ls_name = ls_name + dt.Rows[i]["hy_userid"].ToString();
                this.Response.Write("<li><a href=\"#\" onclick=\"if(document.forms[0].txthy_jsrname.value==''){document.forms[0].txthy_jsrname.value='" + dt.Rows[i]["hy_username"].ToString() + "';document.forms[0].txthy_jsrid.value='" + dt.Rows[i]["hy_userid"].ToString() + "';}else{document.forms[0].txthy_jsrname.value=document.forms[0].txthy_jsrname.value+'+" + dt.Rows[i]["hy_username"].ToString() + "';document.forms[0].txthy_jsrid.value=document.forms[0].txthy_jsrid.value+'+" + dt.Rows[i]["hy_userid"].ToString() + "';} document.all('sampleLayer').style.visibility='hidden'; \">" + dt.Rows[i]["hy_username"].ToString() + "</a></li>");
            }
            this.Response.Write("</div>");
            db.Close();
            return;
        }
    }
Esempio n. 22
0
    //得到某一个字段的HTML
    //pi_flag 0:不赋值  1:需赋值
    //ifsearch:是否查询时使用 0:非查询时使用 1:查询时使用
    public string GetFieldHtml(string hy_mudelid, string hy_fieldid, string pi_flag, string hy_tableid, string ifsearch)
    {
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        DataTable dtfield = Hyoa_flowfield.GetSQLfieldBymudelidAndFieldidAndTableid(hy_mudelid, hy_fieldid, hy_tableid);
        HyoaClass.DAO db = new HyoaClass.DAO();
        string lsField = "";
        string field_css = "";
        string field_value = "";
        string field_functionhy_onclick = "";
        string field_functionhy_ondblclick = "";
        string field_functionhy_onchange = "";
        string field_functionhy_onkeydown = "";
        string field_functionhy_onkeyup = "";

        if (dtfield.Rows.Count > 0)
        {
            //得到该字段的样式start
            if (dtfield.Rows[0]["hy_ifreadonly"].ToString() == "是")
            {
                if (ifsearch == "0")
                    field_css += " readonly ";
            }
            if (dtfield.Rows[0]["hy_class"].ToString() != "")
            {
                field_css += " class='" + dtfield.Rows[0]["hy_class"].ToString() + "' ";
            }
            if (dtfield.Rows[0]["hy_width"].ToString() != "")
            {
                field_css += " style='width:" + dtfield.Rows[0]["hy_width"].ToString() + ";";
            }
            else
            {
                field_css += " style='";
            }
            if (dtfield.Rows[0]["hy_height"].ToString() != "")
            {
                field_css += " height:" + dtfield.Rows[0]["hy_height"].ToString() + "'";
            }
            else
            {
                field_css += "'";
            }

            //默认值
            //默认值取值的方式,查询时不使用默认值
            if (ifsearch == "0")
            {
                if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() != "")
                {
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "0")
                        field_value += dtfield.Rows[0]["hy_defaultvalue"].ToString();

                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "1")
                    {
                        DataTable dtdefault = db.GetDataTable(dtfield.Rows[0]["hy_defaultvalue"].ToString());
                        if (dtdefault.Rows.Count > 0)
                            field_value += dtdefault.Rows[0][0].ToString();
                    }
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "2")
                    {
                        field_value += Session[dtfield.Rows[0]["hy_defaultvalue"].ToString()].ToString();
                    }
                    if (dtfield.Rows[0]["hy_defaultvaluetype"].ToString() == "3")
                    {
                        if (dtfield.Rows[0]["hy_defaultvalue"].ToString() == "yyyy-mm-dd")
                            field_value += System.DateTime.Now.ToShortDateString();
                        else
                            field_value += System.DateTime.Now.ToString();
                    }
                }
            }

            //事件
            if (dtfield.Rows[0]["hy_onclick"].ToString() != "")
            {
                field_functionhy_onclick += " onclick=\"" + dtfield.Rows[0]["hy_onclick"].ToString() + "\" ";
            }
            if (dtfield.Rows[0]["hy_ondblclick"].ToString() != "")
            {
                field_functionhy_ondblclick += " ondblclick=\"" + dtfield.Rows[0]["hy_ondblclick"].ToString() + "\" ";
            }
            if (dtfield.Rows[0]["hy_onchange"].ToString() != "")
            {
                field_functionhy_onchange += " onchange=\"" + dtfield.Rows[0]["hy_onchange"].ToString() + "\" ";
            }
            if (dtfield.Rows[0]["hy_onkeydown"].ToString() != "")
            {
                field_functionhy_onkeydown += " onkeydown=\"" + dtfield.Rows[0]["hy_onkeydown"].ToString() + "\" ";
            }
            if (dtfield.Rows[0]["hy_onkeyup"].ToString() != "")
            {
                field_functionhy_onkeyup += " onkeyup=\"" + dtfield.Rows[0]["hy_onkeyup"].ToString() + "\" ";
            }
            //得到该字段的样式end
            string field_type = dtfield.Rows[0]["hy_fieldtype"].ToString();
            //单行文本
            if (field_type == "文本")
            {
                lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_functionhy_ondblclick + field_functionhy_onkeydown + field_functionhy_onkeyup + field_css + " value=\"" + field_value + "\">";
            }
            //多行文本
            if (field_type == "多行文本")
            {
                lsField = "<textarea name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_css + " >" + field_value + "</textarea>";
            }
            //日期
            if (field_type == "日期")
            {
                if (ifsearch == "0")
                {
                    lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_css + " value=\"" + field_value + "\">";
                }
                else
                {

                    field_css = " style='width:47%;'";
                    lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_start_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_start_1\" " + "onclick=\"WdatePicker({el:$dp.$('" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_start_1')})\""  +field_css + " value=\"" + field_value + "\">至";
                    lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_end_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_end_1\" "  +"onclick=\"WdatePicker({el:$dp.$('" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_end_1')})\""  +field_css + " value=\"" + field_value + "\">";
                }
            }
            //数值
            if (field_type == "数值")
            {
                if (ifsearch == "0")
                {
                    lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_functionhy_ondblclick + field_functionhy_onkeydown + field_functionhy_onkeyup + field_css + " value=\"" + field_value + "\">";
                }
                else
                {
                    field_css = " style='width:47%;'";
                    lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_start_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_start_1\" " + field_functionhy_onclick + field_functionhy_ondblclick + field_functionhy_onkeydown + field_functionhy_onkeyup + field_css + " value=\"" + field_value + "\">到";
                    lsField += "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_end_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_end_1\" " + field_functionhy_onclick + field_functionhy_ondblclick + field_functionhy_onkeydown + field_functionhy_onkeyup + field_css + " value=\"" + field_value + "\">";
                }
            }
            //对话框列表(下拉框
            if (field_type == "对话框列表")
            {
                lsField = "<select name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onchange + field_css + "> ";
                //有哪些选项
                lsField += "<option value=''></option>";
                if (dtfield.Rows[0]["hy_optiontype"].ToString() == "0")
                {
                    string[] lv_options = dtfield.Rows[0]["hy_options"].ToString().Split('#');
                    for (var ii = 0; ii < lv_options.Length; ii++)
                    {
                        lsField += "<option value='" + lv_options[ii].ToString() + "'>" + lv_options[ii].ToString() + "</option>";
                    }
                }
                if (dtfield.Rows[0]["hy_optiontype"].ToString() == "1")
                {
                    DataTable dtoptions = db.GetDataTable(dtfield.Rows[0]["hy_options"].ToString());
                    if (dtoptions.Rows.Count > 0)
                    {
                        for (var ii = 0; ii < dtoptions.Rows.Count; ii++)
                        {
                            lsField += "<option value='" + dtoptions.Rows[ii][0].ToString() + "'>" + dtoptions.Rows[ii][0].ToString() + "</option>";
                        }
                    }
                }
                lsField += "</select>";
            }
            //复选框
            if (field_type == "复选框")
            {
                //有哪些选项
                if (dtfield.Rows[0]["hy_optiontype"].ToString() == "0")
                {
                    string[] lv_options = dtfield.Rows[0]["hy_options"].ToString().Split('#');
                    for (var ii = 0; ii < lv_options.Length; ii++)
                    {
                        if (field_value == lv_options[ii].ToString())
                            lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + (ii.ToString()) + "_1\" type=checkbox checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_css + " value=\"" + lv_options[ii].ToString() + "\" />" + lv_options[ii].ToString();
                        else
                            lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + (ii.ToString()) + "_1\" type=checkbox id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_css + " value=\"" + lv_options[ii].ToString() + "\" />" + lv_options[ii].ToString();
                    }
                }
                if (dtfield.Rows[0]["hy_optiontype"].ToString() == "1")
                {
                    DataTable dtoptions = db.GetDataTable(dtfield.Rows[0]["hy_options"].ToString());
                    if (dtoptions.Rows.Count > 0)
                    {
                        for (var ii = 0; ii < dtoptions.Rows.Count; ii++)
                        {
                            if (field_value == dtoptions.Rows[ii][0].ToString())
                                lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + (ii.ToString()) + "_1\" type=checkbox checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_css + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                            else
                                lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + (ii.ToString()) + "_1\" type=checkbox id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_css + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                        }
                    }
                }
            }

            //单选框
            if (field_type == "单选框")
            {
                //有哪些选项
                if (dtfield.Rows[0]["hy_optiontype"].ToString() == "0")
                {
                    string[] lv_options = dtfield.Rows[0]["hy_options"].ToString().Split('#');
                    for (var ii = 0; ii < lv_options.Length; ii++)
                    {
                        if (field_value == lv_options[ii].ToString())
                            lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + (ii.ToString()) + "_1\" type=radio checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_css + " value=\"" + lv_options[ii].ToString() + "\" />" + lv_options[ii].ToString();
                        else
                            lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + (ii.ToString()) + "_1\" type=radio id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_css + " value=\"" + lv_options[ii].ToString() + "\" />" + lv_options[ii].ToString();
                    }
                }
                if (dtfield.Rows[0]["hy_optiontype"].ToString() == "1")
                {
                    DataTable dtoptions = db.GetDataTable(dtfield.Rows[0]["hy_options"].ToString());
                    if (dtoptions.Rows.Count > 0)
                    {
                        for (var ii = 0; ii < dtoptions.Rows.Count; ii++)
                        {
                            if (field_value == dtoptions.Rows[ii][0].ToString())
                                lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + (ii.ToString()) + "_1\" type=radio checked=true id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_css + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                            else
                                lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + (ii.ToString()) + "_1\" type=radio id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_css + " value=\"" + dtoptions.Rows[ii][0].ToString() + "\" />" + dtoptions.Rows[ii][0].ToString();
                        }
                    }
                }
            }
            //口令
            if (field_type == "口令")
            {
                lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=password id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_functionhy_onclick + field_css + " value=\"" + field_value + "\">";
            }
            //附件组件
            if (field_type == "附件组件")
            {
                lsField = "<input name=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" type=text id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\" " + field_css + " value=\"" + "\"><input type=button id=\"uploadfile1\" text='附件' class=\"text1\" onclick=\"window.open('/ggdy/uploadfile.aspx?id=" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "');\" ";
            }
            //说明文字
            if (field_type == "说明文字")
            {
                lsField = "<span id=\"" + dtfield.Rows[0]["hy_sqlfield"].ToString() + "_1\">" + field_value + "</span>";
            }
            //编辑器文本
            //if (field_type.Equals("ewebeditor"))
            //{
            //    tfile.setField(field_name, field_value);
            //}

            db.Close();
        }
        return lsField;
    }
Esempio n. 23
0
    private void DataPlay(int PageNo)
    {
        //得到当前页号
        this.curpage.Text = PageNo.ToString();
        HyoaClass.DAO db = new HyoaClass.DAO();
        string sql = "";

        sql = "select * from hyp_flowmain where hy_mudelid='" + this.txtmudelid.Value + "' and hy_tableid='" + this.txttableid.Value + "'  ";
        if (this.hy_djrname_1.Value != "")
            sql += " and hy_djrname like '%" + this.hy_djrname_1.Value + "%' ";

        if (this.hy_bt_1.Value != "")
            sql += " and hy_bt like '%" + this.hy_bt_1.Value + "%' ";

        sql += " order by hy_djsj desc ";

        DataTable dt = db.GetDataTable(sql);
        DataTable tempTable = dt.Clone();
        for (int i = (PageNo - 1) * System.Int32.Parse(PageSize.Text); i < PageNo * System.Int32.Parse(PageSize.Text); i++)
        {
            if (i > dt.Rows.Count - 1)
                break;

            DataRow dr = tempTable.NewRow();
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                dr[dt.Columns[j].ColumnName] = dt.Rows[i][j];
            }
            tempTable.Rows.Add(dr);
        }

        int TotalRecord = dt.Rows.Count;
        this.sumts.Text = TotalRecord.ToString();
        this.sumts2.Text = TotalRecord.ToString();
        this.ShowTotalRecord.Text = TotalRecord.ToString();
        //计算及显示总页数
        int TotalPage;
        if (TotalRecord < System.Int32.Parse(PageSize.Text))
        {
            TotalPage = 1;
        }
        else
        {
            if (TotalRecord % System.Int32.Parse(PageSize.Text) != 0)
            {
                TotalPage = TotalRecord / System.Int32.Parse(PageSize.Text) + 1;

            }
            else
            {
                TotalPage = TotalRecord / System.Int32.Parse(PageSize.Text);

            }
        }
        this.ShowTotalPage.Text = TotalPage.ToString();
        this.rptlist.DataSource = tempTable;
        this.rptlist.DataBind();
        dt.Clear();
    }
Esempio n. 24
0
    //打开文档显示
    private void DataPlay()
    {
        if (this.Request.QueryString["op"] != null)
        {
            HyoaClass.DAO db = new HyoaClass.DAO();
            this.txtop.Value = this.Request.QueryString["op"].ToString();           //我要投票还是查看投票
            this.txtdocid.Value = this.Request.QueryString["id"].ToString();        //文档ID

            //我要投票
            if (this.Request.QueryString["op"] == "add")
            {
                //判断是否已经投票过
                string issql = "select * from hyk_whzx_tpgl_tpmx where hy_tpztid='" + this.txtdocid.Value + "' and hy_tprid ='" + Session["hyuid"].ToString() + "'";
                DataTable isdt = db.GetDataTable(issql);
                if (isdt.Rows.Count > 0)
                {
                    Response.Write("<script>alert('您已经投票了!');window.location='list_tpgl_wytp.aspx'</script>");
                }
                //显示我要投票
                this.btn_submit.Visible = true;
            }

            //根据id得到信息
            string sql = "select * from hyk_whzx_tpgl where id='" + this.txtdocid.Value + "'";
            DataTable dt = db.GetDataTable(sql);
            if (dt.Rows.Count > 0)
            {
                #region 根据id得到信息
                this.txtdjr.Value = dt.Rows[0]["hy_djr"].ToString();
                this.txtdjrid.Value = dt.Rows[0]["hy_djrid"].ToString();
                this.hy_lbl1.Text = System.DateTime.Parse(dt.Rows[0]["hy_djsj"].ToString()).ToString("yyyy-MM-dd");
                this.hy_lbl2.Text = dt.Rows[0]["hy_tplb"].ToString();
                this.hy_lbl3.Text = System.DateTime.Parse(dt.Rows[0]["hy_tpkssj"].ToString()).ToString("yyyy-MM-dd");
                this.hy_lbl4.Text = System.DateTime.Parse(dt.Rows[0]["hy_tpjssj"].ToString()).ToString("yyyy-MM-dd");
                this.hy_lbl5.Text = dt.Rows[0]["hy_xxsm"].ToString();
                this.hy_lbl6.Text = dt.Rows[0]["hy_bt"].ToString();

                //判断该投票是否已经过期
                if (Convert.ToDateTime(System.DateTime.Now.ToString("yyyy-MM-dd")) > Convert.ToDateTime(this.hy_lbl4.Text))
                {
                    //将该文档设为“结束投票”
                    string ls_sql = "update hyk_whzx_tpgl set hy_jssj=getdate(),hy_gjzt='结束投票' where id='" + this.txtdocid.Value + "'";
                    db.Execute(ls_sql);

                    Response.Write("<script>alert('对不起,该投票已经结束!');window.location='list_tpgl_wytp.aspx'</script>");
                    return;
                }

                //根据单选或多选得到选项
                this.hy_tpfs.Value = dt.Rows[0]["hy_ktxx"].ToString();     //单选还是多选
                string lssql = "select * from hyk_whzx_tpgl_tpxx where hy_tpztid='" + this.txtdocid.Value + "'";
                DataTable dt2 = db.GetDataTable(lssql);
                if (this.hy_tpfs.Value == "多选")
                {
                    this.GridView1.Visible = false;
                    GridView2.DataSource = dt2;
                    GridView2.DataBind();
                }
                else
                {
                    this.GridView2.Visible = false;
                    GridView1.DataSource = dt2;
                    GridView1.DataBind();
                }
                dt2.Clear();
                #endregion
            }
            dt.Clear();
            db.Close();
        }
    }
Esempio n. 25
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string ls_mudelid="";
        string ls_colname="";
        string ls_colid="";
        string ls_colname2="";
        string ls_colid2="";
        string ls_colname3="";
        string ls_colid3="";
        string ls_tableid = "";

        if (this.Request.QueryString["mudelid"] != null)
        {
            ls_mudelid = this.Request.QueryString["mudelid"].ToString();
        }
        if (this.Request.QueryString["tableid"] != null)
        {
            ls_tableid = this.Request.QueryString["tableid"].ToString();
        }

        //模块对应的域
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        DataTable dt4 = Hyoa_flowfield.GetflowfieldsbyMudelidAndTableid(ls_mudelid, ls_tableid);
        if (dt4.Rows.Count > 0)
        {
            for (int i = 0; i < dt4.Rows.Count; i++)
            {
                if (ls_colname == "")
                {
                    ls_colname = dt4.Rows[i]["hy_fieldname"].ToString();
                    ls_colid = dt4.Rows[i]["hy_fieldid"].ToString();

                }
                else
                {
                    ls_colname = ls_colname + "+" + dt4.Rows[i]["hy_fieldname"].ToString();
                    ls_colid = ls_colid + "+" + dt4.Rows[i]["hy_fieldid"].ToString();
                }
            }
        }
        dt4.Clear();
        string lsid = "";
        //HyoaClass.Hyoa_listconfig Hyoa_listconfig = new HyoaClass.Hyoa_listconfig();
        //dt4 = Hyoa_listconfig.GetlistconfigsbyMudelidAndTableid(ls_mudelid,ls_tableid);
        HyoaClass.DAO db = new HyoaClass.DAO();
        string sql = "select *from hyt_searchconfig where hy_mudelid='" + ls_mudelid + "' and hy_tableid='" + ls_tableid + "'";
        dt4 = db.GetDataTable(sql);
        if (dt4.Rows.Count > 0)
        {
            ls_colname2 = dt4.Rows[0]["hy_columnshow"].ToString();
            ls_colid2 = dt4.Rows[0]["hy_columnshowid"].ToString();
            lsid = dt4.Rows[0]["ID"].ToString();
            ls_colname3 = dt4.Rows[0]["hy_xszd"].ToString();
            ls_colid3 = dt4.Rows[0]["hy_xszdid"].ToString();
        }

        dt4.Clear();
        //HyoaClass.Hyoa_listsearchfield Hyoa_listsearchfield = new HyoaClass.Hyoa_listsearchfield();
        //dt4 = Hyoa_listsearchfield.GetlistsearchfieldsbyMudelidAndListid(ls_mudelid,lsid);
        //if (dt4.Rows.Count > 0)
        //{
        //    for (int k = 0; k < dt4.Rows.Count; k++)
        //    {
        //        if (ls_colname3 == "")
        //        {
        //            ls_colname3 = dt4.Rows[k]["hy_field"].ToString();
        //            ls_colid3 = dt4.Rows[k]["hy_fieldid"].ToString();

        //        }
        //        else
        //        {
        //            ls_colname3 = ls_colname3 + "+" + dt4.Rows[k]["hy_field"].ToString();
        //            ls_colid3 = ls_colid3 + "+" + dt4.Rows[k]["hy_fieldid"].ToString();
        //        }
        //    }
        //}

            //HyoaClass.Hyoa_listsearchfield Hyoa_listsearchfield = new HyoaClass.Hyoa_listsearchfield();

        //this.Response.Write(ls_colname + "*" + ls_colid + "#" + ls_colname2 + "*" + ls_colid2);
        this.Response.Write(ls_colname + "*" + ls_colid + "#" + ls_colname2 + "*" + ls_colid2 + "#" + ls_colname3 + "*" + ls_colid3);
        //return ;
    }
Esempio n. 26
0
    protected void btnscsj_Click_tzml(object sender, EventArgs e)
    {
        //台账目录
        HyoaClass.DAO db = new HyoaClass.DAO();
        //得到支部概况
        string sql = "select * from hyp_flowmain where hy_mudelid='djgz' and hy_tableid='0e5efe98-49a5-4ccd-9532-8cac74ab328d' and hy_field8='支部概况' ";
        if (this.hy_field9_1.Value != "")
            sql += " and hy_field9 like '%" + this.hy_field9_1.Value + "%' ";
        if (this.hy_djsj_start_1.Value != "")
            sql += " and  CONVERT(varchar(10),hy_field31,120) >= '" + this.hy_djsj_start_1.Value + "' ";

        if (this.hy_djsj_end_1.Value != "")
            sql += " and  CONVERT(varchar(10),hy_field31,120) <= '" + this.hy_djsj_end_1.Value + "' ";
        sql += " order by hy_djsj asc ";
        DataTable dt = db.GetDataTable(sql);
        string lsstr = "";
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            if (lsstr == "")
            {
                lsstr = dt.Rows[i]["hy_bt"].ToString();
            }
            else
            {
                lsstr += "~"+dt.Rows[i]["hy_bt"].ToString();
            }
        }
        //this.hy_count.Text = dt.Rows.Count.ToString();
        this.hy_scsj.Text = lsstr;

        //得到思想建设方面
        sql = "select * from hyp_flowmain where hy_mudelid='djgz' and hy_tableid='0e5efe98-49a5-4ccd-9532-8cac74ab328d' and hy_field12='思想建设方面' ";
        if (this.hy_field9_1.Value != "")
            sql += " and hy_field9 like '%" + this.hy_field9_1.Value + "%' ";
        if (this.hy_djsj_start_1.Value != "")
            sql += " and  CONVERT(varchar(10),hy_field31,120) >= '" + this.hy_djsj_start_1.Value + "' ";

        if (this.hy_djsj_end_1.Value != "")
            sql += " and  CONVERT(varchar(10),hy_field31,120) <= '" + this.hy_djsj_end_1.Value + "' ";
        sql += " order by hy_djsj asc ";
        dt.Clear();
        dt = db.GetDataTable(sql);
        lsstr = "";
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            if (lsstr == "")
            {
                lsstr = dt.Rows[i]["hy_bt"].ToString();
            }
            else
            {
                lsstr += "~" + dt.Rows[i]["hy_bt"].ToString();
            }
        }
        //this.hy_count.Text += "*#" + dt.Rows.Count.ToString();
        this.hy_scsj.Text += "*#" + lsstr;

        //得到组织建设方面
        sql = "select * from hyp_flowmain where hy_mudelid='djgz' and hy_tableid='0e5efe98-49a5-4ccd-9532-8cac74ab328d' and hy_field12='组织建设方面' ";
        if (this.hy_field9_1.Value != "")
            sql += " and hy_field9 like '%" + this.hy_field9_1.Value + "%' ";
        if (this.hy_djsj_start_1.Value != "")
            sql += " and  CONVERT(varchar(10),hy_field31,120) >= '" + this.hy_djsj_start_1.Value + "' ";

        if (this.hy_djsj_end_1.Value != "")
            sql += " and  CONVERT(varchar(10),hy_field31,120) <= '" + this.hy_djsj_end_1.Value + "' ";
        sql += " order by hy_djsj asc ";
        dt.Clear();
        dt = db.GetDataTable(sql);
        lsstr = "";
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            if (lsstr == "")
            {
                lsstr = dt.Rows[i]["hy_bt"].ToString();
            }
            else
            {
                lsstr += "~" + dt.Rows[i]["hy_bt"].ToString();
            }
        }
        //this.hy_count.Text += "*#" + dt.Rows.Count.ToString();
        this.hy_scsj.Text += "*#" + lsstr;

        //得到作风建设方面
        sql = "select * from hyp_flowmain where hy_mudelid='djgz' and hy_tableid='0e5efe98-49a5-4ccd-9532-8cac74ab328d' and hy_field12='作风建设方面' ";
        if (this.hy_field9_1.Value != "")
            sql += " and hy_field9 like '%" + this.hy_field9_1.Value + "%' ";
        if (this.hy_djsj_start_1.Value != "")
            sql += " and  CONVERT(varchar(10),hy_field31,120) >= '" + this.hy_djsj_start_1.Value + "' ";

        if (this.hy_djsj_end_1.Value != "")
            sql += " and  CONVERT(varchar(10),hy_field31,120) <= '" + this.hy_djsj_end_1.Value + "' ";
        sql += " order by hy_djsj asc ";
        dt.Clear();
        dt = db.GetDataTable(sql);
        lsstr = "";
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            if (lsstr == "")
            {
                lsstr = dt.Rows[i]["hy_bt"].ToString();
            }
            else
            {
                lsstr += "~" + dt.Rows[i]["hy_bt"].ToString();
            }
        }
        //this.hy_count.Text += "*#" + dt.Rows.Count.ToString();
        this.hy_scsj.Text += "*#" + lsstr;

        //得到制度建设方面
        sql = "select * from hyp_flowmain where hy_mudelid='djgz' and hy_tableid='0e5efe98-49a5-4ccd-9532-8cac74ab328d' and hy_field12='制度建设方面' ";
        if (this.hy_field9_1.Value != "")
            sql += " and hy_field9 like '%" + this.hy_field9_1.Value + "%' ";
        if (this.hy_djsj_start_1.Value != "")
            sql += " and  CONVERT(varchar(10),hy_field31,120) >= '" + this.hy_djsj_start_1.Value + "' ";

        if (this.hy_djsj_end_1.Value != "")
            sql += " and  CONVERT(varchar(10),hy_field31,120) <= '" + this.hy_djsj_end_1.Value + "' ";
        sql += " order by hy_djsj asc ";
        dt.Clear();
        dt = db.GetDataTable(sql);
        lsstr = "";
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            if (lsstr == "")
            {
                lsstr = dt.Rows[i]["hy_bt"].ToString();
            }
            else
            {
                lsstr += "~" + dt.Rows[i]["hy_bt"].ToString();
            }
        }
        //this.hy_count.Text += "*#" + dt.Rows.Count.ToString();
        this.hy_scsj.Text += "*#" + lsstr;

        //得到反腐倡廉建设方面
        sql = "select * from hyp_flowmain where hy_mudelid='djgz' and hy_tableid='0e5efe98-49a5-4ccd-9532-8cac74ab328d' and hy_field12='反腐倡廉建设方面' ";
        if (this.hy_field9_1.Value != "")
            sql += " and hy_field9 like '%" + this.hy_field9_1.Value + "%' ";
        if (this.hy_djsj_start_1.Value != "")
            sql += " and  CONVERT(varchar(10),hy_field31,120) >= '" + this.hy_djsj_start_1.Value + "' ";

        if (this.hy_djsj_end_1.Value != "")
            sql += " and  CONVERT(varchar(10),hy_field31,120) <= '" + this.hy_djsj_end_1.Value + "' ";
        sql += " order by hy_djsj asc ";
        dt.Clear();
        dt = db.GetDataTable(sql);
        lsstr = "";
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            if (lsstr == "")
            {
                lsstr = dt.Rows[i]["hy_bt"].ToString();
            }
            else
            {
                lsstr += "~" + dt.Rows[i]["hy_bt"].ToString();
            }
        }
        //this.hy_count.Text += "*#" + dt.Rows.Count.ToString();
        this.hy_scsj.Text += "*#" + lsstr;

        //this.hy_scsj.Text = lsstr;
        this.Response.Write("<script>alert('生成完成,请点击导出按钮!');</script>");
    }
Esempio n. 27
0
    private void DataPlay(int PageNo)
    {
        //判断当前用户是否有新建删除权限
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        //if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
        //{
        //    this.tddeldoc.Visible = true; //删除
        //}
        //else
        //{
        //    this.tddeldoc.Visible = false; //删除
        //}

        //得到当前页号
        this.curpage.Text = PageNo.ToString();
        HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();

        //DataTable dt;
        //dt = Hyoa_dbsy.Getdbsys_yb(Session["hyuid"].ToString());
        DataTable dt;
        string lssql22 = "Select * from hyt_dbsy where hy_ifyb=1 and hy_property='待办' and hy_dbrid='" + Session["hyuid"].ToString() + "' ";
        if (this.txtbt.Text != "")
        {
            lssql22 += " and hy_bt like '%" + this.txtbt.Text + "%'";
        }

        lssql22 += " order by hy_createtime desc";
        HyoaClass.DAO db = new HyoaClass.DAO();
        dt = db.GetDataTable(lssql22);

        DataTable tempTable = dt.Clone();
        DataColumn col = new DataColumn("mudelname", typeof(String));
        tempTable.Columns.Add(col);

        for (int i = (PageNo - 1) * System.Int32.Parse(PageSize.Text); i < PageNo * System.Int32.Parse(PageSize.Text); i++)
        {
            if (i > dt.Rows.Count - 1)
                break;

            DataRow dr = tempTable.NewRow();
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                dr[dt.Columns[j].ColumnName] = dt.Rows[i][j];
            }
            //根据模块ID得到模块名称
            HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
            DataTable dt_mudel = Hyoa_mudel.Getmudel(dt.Rows[i]["hy_mudelid"].ToString());
            if(dt_mudel.Rows.Count>0)
                dr["mudelname"] = dt_mudel.Rows[0]["hy_mudelname"].ToString();

            tempTable.Rows.Add(dr);
        }

        int TotalRecord = dt.Rows.Count;
        this.sumts.Text = TotalRecord.ToString();
        this.sumts2.Text = TotalRecord.ToString();
        this.ShowTotalRecord.Text = TotalRecord.ToString();
        //计算及显示总页数
        int TotalPage;
        if (TotalRecord < System.Int32.Parse(PageSize.Text))
        {
            TotalPage = 1;
        }
        else
        {
            if (TotalRecord % System.Int32.Parse(PageSize.Text) != 0)
            {
                TotalPage = TotalRecord / System.Int32.Parse(PageSize.Text) + 1;

            }
            else
            {
                TotalPage = TotalRecord / System.Int32.Parse(PageSize.Text);

            }
        }
        this.ShowTotalPage.Text = TotalPage.ToString();
        this.rptlist.DataSource = tempTable;
        this.rptlist.DataBind();
        dt.Clear();
    }
Esempio n. 28
0
    protected void btnImport_Click(object sender, EventArgs e)
    {
        String sql;
        sql = "";

        if (this.lblDisplay.Text == "")
        {
            this.lblReturnInformation.Text = "请先保存Excel文件!";
        }
        else
        {

            sql = "";
            sql = " select  姓名,日期,签到时间,签退时间,是否旷工,例外情况,部门  from OpenDataSource('Microsoft.Jet.OLEDB.4.0','Data Source=''" + this.lblDisplay.Text + "'';User ID=admin;Password=;Extended properties=Excel 5.0')...Sheet1$ ";

            HyoaClass.DAO db = new HyoaClass.DAO();
            HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();

            DataTable dt = db.GetDataTable(sql);
            
            HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
            DataTable dtuser;

            for (int j = 0; j < dt.Rows.Count; j++)
            {
                HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
                //文档ID
                Hyoa_flowmain.DOCID = Hyoa_global.GetRandom();
                Hyoa_flowmain.hy_mudelid = "kqgl";
                Hyoa_flowmain.hy_tableid = "74e7e280-4fc5-4ccb-be3d-0f995ac2c934";
                Hyoa_flowmain.hy_flowid = "";
                Hyoa_flowmain.hy_flowname = "";
                Hyoa_flowmain.hy_curtacheid = "";
                Hyoa_flowmain.hy_curtachename = "";
                Hyoa_flowmain.hy_curclrid = "";
                Hyoa_flowmain.hy_curclrname = "";

                dtuser = Hyoa_user.GetusersbynameforCX(dt.Rows[j]["姓名"].ToString());
                if (dtuser.Rows.Count > 0)
                {
                    Hyoa_flowmain.hy_djrid = dtuser.Rows[0]["hy_userid"].ToString();
                    Hyoa_flowmain.hy_djrbmid = dtuser.Rows[0]["hy_deptid"].ToString();
                }
                else
                {
                    Hyoa_flowmain.hy_djrid = "";
                    Hyoa_flowmain.hy_djrbmid = "";
                }
                Hyoa_flowmain.hy_djrname = dt.Rows[j]["姓名"].ToString();                
                Hyoa_flowmain.hy_djrbmname = dt.Rows[j]["部门"].ToString();
                Hyoa_flowmain.hy_djsj = System.DateTime.Now.ToString();

                Hyoa_flowmain.hy_bt = "";
                Hyoa_flowmain.hy_content1 = "";
                Hyoa_flowmain.hy_content2 = "";
                Hyoa_flowmain.hy_content3 = "";
                Hyoa_flowmain.hy_content4 = "";
                Hyoa_flowmain.hy_content5 = "";
                Hyoa_flowmain.hy_content6 = "";
                Hyoa_flowmain.hy_content7 = "";
                Hyoa_flowmain.hy_content8 = "";
                Hyoa_flowmain.hy_content9 = "";
                Hyoa_flowmain.hy_content10 = "";
                Hyoa_flowmain.hy_content11 = "";
                Hyoa_flowmain.hy_content12 = "";
                Hyoa_flowmain.hy_content13 = "";
                Hyoa_flowmain.hy_content14 = "";
                Hyoa_flowmain.hy_content15 = "";

                Hyoa_flowmain.hy_field1 = dt.Rows[j]["签到时间"].ToString();
                Hyoa_flowmain.hy_field2 = dt.Rows[j]["签退时间"].ToString();
                if (dt.Rows[j]["是否旷工"].ToString() == "True")
                {
                    Hyoa_flowmain.hy_field3 = "是";
                }
                else
                {
                    Hyoa_flowmain.hy_field3 = "";
                }

                Hyoa_flowmain.hy_field4 = dt.Rows[j]["例外情况"].ToString();
                Hyoa_flowmain.hy_field5 = "";
                Hyoa_flowmain.hy_field6 = "";
                Hyoa_flowmain.hy_field7 = "";
                Hyoa_flowmain.hy_field8 = "";
                Hyoa_flowmain.hy_field9 = "";
                Hyoa_flowmain.hy_field10 = "";
                Hyoa_flowmain.hy_field11 = "";
                Hyoa_flowmain.hy_field12 = "";
                Hyoa_flowmain.hy_field13 = "";
                Hyoa_flowmain.hy_field14 = "";
                Hyoa_flowmain.hy_field15 = "";
                Hyoa_flowmain.hy_field16 = "";
                Hyoa_flowmain.hy_field17 = "";
                Hyoa_flowmain.hy_field18 = "";
                Hyoa_flowmain.hy_field19 = "";
                Hyoa_flowmain.hy_field20 = "";
                Hyoa_flowmain.hy_field21 = "";
                Hyoa_flowmain.hy_field22 = "";
                Hyoa_flowmain.hy_field23 = "";
                Hyoa_flowmain.hy_field24 = "";
                Hyoa_flowmain.hy_field25 = "";
                Hyoa_flowmain.hy_field26 = "";
                Hyoa_flowmain.hy_field27 = "";
                Hyoa_flowmain.hy_field28 = "";
                Hyoa_flowmain.hy_field29 = "";
                Hyoa_flowmain.hy_field30 = "";
                Hyoa_flowmain.hy_field31 = dt.Rows[j]["日期"].ToString(); ;
                Hyoa_flowmain.hy_field32 = "";
                Hyoa_flowmain.hy_field33 = "";
                Hyoa_flowmain.hy_field34 = "";
                Hyoa_flowmain.hy_field35 = "";
                Hyoa_flowmain.hy_field36 = 0;  
                Hyoa_flowmain.hy_field37 = 0;
                Hyoa_flowmain.hy_field38 = 0;
                Hyoa_flowmain.hy_field39 = 0;
                Hyoa_flowmain.hy_field40 = 0;
                Hyoa_flowmain.hy_field41 = "";
                Hyoa_flowmain.hy_field42 = "";
                Hyoa_flowmain.hy_field43 = "";
                Hyoa_flowmain.hy_field44 = "";
                Hyoa_flowmain.hy_field45 = "";
                Hyoa_flowmain.hy_field46 = "";
                Hyoa_flowmain.hy_field47 = "";
                Hyoa_flowmain.hy_field48 = "";
                Hyoa_flowmain.hy_field49 = "";
                Hyoa_flowmain.hy_field50 = "";
                Hyoa_flowmain.hy_field51 = "";
                Hyoa_flowmain.hy_field52 = "";
                Hyoa_flowmain.hy_field53 = "";
                Hyoa_flowmain.hy_field54 = "";
                Hyoa_flowmain.hy_field55 = "";
                Hyoa_flowmain.hy_field56 = "";
                Hyoa_flowmain.hy_field57 = "";
                Hyoa_flowmain.hy_field58 = "";
                Hyoa_flowmain.hy_field59 = "";
                Hyoa_flowmain.hy_field60 = "";

                Hyoa_flowmain.hy_field61 = "";
                Hyoa_flowmain.hy_field62 = "";
                Hyoa_flowmain.hy_field63 = "";
                Hyoa_flowmain.hy_field64 = "";
                Hyoa_flowmain.hy_field65 = "";
                Hyoa_flowmain.hy_field66 = "";
                Hyoa_flowmain.hy_field67 = "";
                Hyoa_flowmain.hy_field68 = "";
                Hyoa_flowmain.hy_field69 = "";
                Hyoa_flowmain.hy_field70 = "";


                Hyoa_flowmain.hy_field71 = 0;
                Hyoa_flowmain.hy_field72 = 0;
                Hyoa_flowmain.hy_field73 = 0;
                Hyoa_flowmain.hy_field74 = 0;
                Hyoa_flowmain.hy_field75 = 0;
                Hyoa_flowmain.hy_field76 = 0;
                Hyoa_flowmain.hy_field77 = 0;
                Hyoa_flowmain.hy_field78 = 0;
                Hyoa_flowmain.hy_field79 = 0;
                Hyoa_flowmain.hy_field80 = 0;

                Hyoa_flowmain.hy_field81 = 0;
                Hyoa_flowmain.hy_field82 = 0;
                Hyoa_flowmain.hy_field83 = 0;
                Hyoa_flowmain.hy_field84 = 0;
                Hyoa_flowmain.hy_field85 = 0;
                Hyoa_flowmain.hy_field86 = 0;
                Hyoa_flowmain.hy_field87 = 0;
                Hyoa_flowmain.hy_field88 = 0;
                Hyoa_flowmain.hy_field89 = 0;
                Hyoa_flowmain.hy_field90 = 0;

                Hyoa_flowmain.hy_field91 = 0;
                Hyoa_flowmain.hy_field92 = 0;
                Hyoa_flowmain.hy_field93 = 0;
                Hyoa_flowmain.hy_field94 = 0;
                Hyoa_flowmain.hy_field95 = 0;
                Hyoa_flowmain.hy_field96 = 0;
                Hyoa_flowmain.hy_field97 = 0;
                Hyoa_flowmain.hy_field98 = 0;
                Hyoa_flowmain.hy_field99 = 0;
                Hyoa_flowmain.hy_field100 = 0;

                Hyoa_flowmain.hy_iftx = "";
                Hyoa_flowmain.hy_zhtxsj = "";
                Hyoa_flowmain.hy_readuserlist = "";

                Hyoa_flowmain.Insert();
                   
            }
            db.Close();
            this.lblReturnInformation.Text = "导入成功";

            if (File.Exists(this.lblDisplay.Text))
            {
                System.IO.File.Delete(this.lblDisplay.Text);
            }

        }
    }
Esempio n. 29
0
    private void DataPlay(int PageNo)
    {
        //得到当前模块对应的role
        HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
        DataTable dt_mudel = Hyoa_mudel.Getmudel(this.txtmudelid.Value);
        string ls_role = "Role9999";
        if (dt_mudel.Rows.Count > 0)
            ls_role = dt_mudel.Rows[0]["hy_roleid"].ToString();

        //判断当前用户是否有删除权限
        HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
        if (Hyoa_global.isHaveRole(ls_role, this.Session["hyuid"].ToString()) || Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
        {
            this.isrole.Value = "1";
            this.tddeldoc.Visible = true; //删除
        }
        else
        {
            this.isrole.Value = "0";
            this.tddeldoc.Visible = false; //删除
        }

        //得到当前页号
        this.curpage.Text = PageNo.ToString();
        HyoaClass.DAO db = new HyoaClass.DAO();

        string ls_user = "";
        if (this.Request.QueryString["user"] != null)
            ls_user = this.Request.QueryString["user"].ToString();

        string sql = "";

        sql = "select * from hyp_flowmain where hy_mudelid='" + this.txtmudelid.Value + "' and hy_tableid='" + this.txttableid.Value + "' ";
        sql += " and hy_field1='" + ls_user + "' and left(convert(char(7),getdate(),120),4)=left(convert(char(7),hy_field31,120),4) order by hy_field31 desc ";

        DataTable dt = db.GetDataTable(sql);
        DataTable tempTable = dt.Clone();
        for (int i = (PageNo - 1) * System.Int32.Parse(PageSize.Text); i < PageNo * System.Int32.Parse(PageSize.Text); i++)
        {
            if (i > dt.Rows.Count - 1)
                break;

            DataRow dr = tempTable.NewRow();
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                dr[dt.Columns[j].ColumnName] = dt.Rows[i][j];
            }
            tempTable.Rows.Add(dr);
        }

        int TotalRecord = dt.Rows.Count;
        this.sumts.Text = TotalRecord.ToString();
        this.sumts2.Text = TotalRecord.ToString();
        this.ShowTotalRecord.Text = TotalRecord.ToString();
        //计算及显示总页数
        int TotalPage;
        if (TotalRecord < System.Int32.Parse(PageSize.Text))
        {
            TotalPage = 1;
        }
        else
        {
            if (TotalRecord % System.Int32.Parse(PageSize.Text) != 0)
            {
                TotalPage = TotalRecord / System.Int32.Parse(PageSize.Text) + 1;

            }
            else
            {
                TotalPage = TotalRecord / System.Int32.Parse(PageSize.Text);

            }
        }
        this.ShowTotalPage.Text = TotalPage.ToString();
        this.rptlist.DataSource = tempTable;
        this.rptlist.DataBind();
        dt.Clear();
    }
Esempio n. 30
0
    public string CreateCharts()
    {
        string strXML;
        string lssql;
        string lscolor;
        lscolor = "color='D64646'";
        strXML = "";
        //统计日期
        string lsdatestart="";
        string lsdateend="";
        string lsif="";
        if (this.Request.QueryString["datestart"] != null)
        {
            if (this.Request.QueryString["datestart"].ToString() != "")
            {
                lsdatestart = this.Request.QueryString["datestart"].ToString();
                lsif = lsif + " and hy_field31>='" + lsdatestart + "'";
            }
        }
        if (this.Request.QueryString["dateend"] != null)
        {
            if (this.Request.QueryString["dateend"].ToString() != "")
            {
                lsdateend = this.Request.QueryString["dateend"].ToString();
                lsif = lsif + " and hy_field31<='" + lsdateend + "'";
            }
        }

        HyoaClass.DAO db = new HyoaClass.DAO();
        lssql = "select  sum(convert(float,hy_field9)) as fs,b.hy_deptname as hy_field6 from hyt_user as a,hyt_dept as b,hyp_flowmain as c where a.hy_deptid=b.hy_deptid and rtrim(ltrim(c.hy_field6))=a.hy_username and c.hy_mudelid='xxgl' and c.hy_tableid='f1265875-5494-465f-ac33-6fa43d208c8f' " + lsif + " group by b.hy_deptname";
        DataTable dt = db.GetDataTable(lssql);
        //HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
        //DataTable dt = Hyoa_user.GetusersOrderbydeptsortandusersort();
        //HyoaClass.DAO db=new HyoaClass.DAO();
        //DataTable dtfs;
        string lssumdate="";
        if (lsdatestart != "")
        {
            lssumdate = lsdatestart;
        }
        if (lsdateend != "")
        {
            lssumdate = lssumdate + "至" + lsdateend;
        }
        else
        {
            lssumdate = lssumdate + "至今";
        }

        dt.DefaultView.Sort = "fs desc";
        DataTable dtTemp = dt.DefaultView.ToTable();

        //strXML +="<graph caption='绩效统计' showNames='1' showvalues='" + 100 + "' baseFontSize='12' xAxisName='Name' yAxisName='Point' decimalPrecision='0' formatNumberScale='0'>";
        strXML += "<graph caption='" + lssumdate + "信息统计' showNames='1'  baseFontSize='12' xAxisName='姓    名' yAxisName='Point' decimalPrecision='0' formatNumberScale='0'>";
        int n = 0;
        for (int i = 0; i < dtTemp.Rows.Count; i++)
        {
            //lscolor = lscolor.Substring(0, 9) + (i * 100).ToString() + "'";

            if (System.Double.Parse(dtTemp.Rows[i]["fs"].ToString()) > 50)
            {
                lscolor = "color='FF0202'";
            }
            if (System.Double.Parse(dtTemp.Rows[i]["fs"].ToString()) > 20 && System.Double.Parse(dtTemp.Rows[i]["fs"].ToString()) <= 50)
            {
                lscolor = "color='FA01DA'";
            }
            if (System.Double.Parse(dtTemp.Rows[i]["fs"].ToString()) > 5 && System.Double.Parse(dtTemp.Rows[i]["fs"].ToString()) <= 20)
            {
                lscolor = "color='9002FD'";
            }
            if (System.Double.Parse(dtTemp.Rows[i]["fs"].ToString()) > 1 && System.Double.Parse(dtTemp.Rows[i]["fs"].ToString()) <= 5)
            {
                lscolor = "color='00FD65'";
            }

            //lssql = "select sum(convert(int,hy_field12)) from hyp_flowmain where hy_mudelid='rsgl' and hy_tableid='6047076e-6a95-4fb8-aec8-5551d3900590' and hy_field10 = '" + dt.Rows[i]["hy_userid"].ToString() + "'";
            //dtfs = db.GetDataTable(lssql);
            strXML += "<set name='" + dtTemp.Rows[i]["hy_field6"].ToString() + "' value='" + dtTemp.Rows[i]["fs"].ToString() + "' " + lscolor + " />";
            n++;
        }
        //strXML += "<set name='人员1' value='" + "30" + "' color='D64646' />";
        //strXML += "<set name='人员2' value='" + "60" + "' color='8E468E' />";
        //strXML += "<set name='人员3' value='" + "90" + "' color='8E468E' />";
        db.Close();
        strXML += "</graph>";
        string lsnlen = "";
        lsnlen = (n * 115).ToString();

        //this.lbscrbdataY.Text = "&nbsp;&nbsp;<font color=red>生产日报</font><br>当日实绩:" + xmldata[5] + "吨<br>" + "月度计划:" + xmldata[0] + "吨<br>" + "月度累计:" + xmldata[1] + "吨<br>" + "完成月计划:" + xmldata[2] + "%<br>" + "年度累计:" + xmldata[6] + "吨<br>" + "完成年计划:" + xmldata[7] + "%<br>";
        return FusionCharts.RenderChartHTML("/app/FusionChartsFree/Charts/FCF_Column3D.swf", "ChartId", strXML, "myNext", lsnlen, "500", false);
        /////ztmend
    }