示例#1
0
    private void LoadData()
    {
        string strHTML = string.Empty;
        string strSQL  = string.Empty;

        // 布线工程
        strSQL = "SELECT GCMC,MAX(W_GCGD1.ID) IID,COUNT(W_GCGD1.ID) MXCOUNT FROM W_GCGD_USERS,W_GCGD1,W_GCGD2,S_YH_QXZ WHERE USERS=" + DefaultUser + " AND FLAG=1 AND W_GCGD1.GCDH=W_GCGD2.GCDH AND W_GCGD1.ID=GCDID and W_GCGD_USERS.USERS=USERID and QXZID=4 GROUP BY GCMC ORDER BY GCMC";

        if (OP_Mode.SQLRUN(strSQL))
        {
            if (OP_Mode.Dtv.Count > 0)
            {
                for (int i = 0; i < OP_Mode.Dtv.Count; i++)
                {
                    strHTML += " <div class='infobox infobox-green'> ";
                    strHTML += "<div class='infobox-content'> ";
                    strHTML += "  <span class='icon-legal'>&nbsp;<a href = '\\GDGL\\MyGDAZWZ.ASPX?ID=" + OP_Mode.Dtv[i]["IID"].ToString() + "' >" + OP_Mode.Dtv[i]["GCMC"].ToString() + "</a></span> ";
                    strHTML += " <div class='infobox-content'> ";
                    strHTML += "    <a href = '\\GDGL\\MyGDAZWZ.ASPX?ID=" + OP_Mode.Dtv[i]["IID"].ToString() + "' > 累计:" + OP_Mode.Dtv[i]["MXCOUNT"].ToString() + " 安装项</a>";
                    strHTML += " </div> ";
                    strHTML += "</div> ";
                    strHTML += "</div> ";
                }
            }
        }

        Dtv_HTML.InnerHtml = strHTML;
    }
示例#2
0
    /// <summary>
    ///  1\2\4\7\15天记忆训练
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    #region "GridView_Remember 读取记忆训练 相关代码"
    /// <summary>

    /// 模块列表读取

    /// </summary>

    private void Load_GridView_Remember()

    {
        // 获取GridView排序数据列及排序方向

        string sortExpression = this.GridView_Remember.Attributes["SortExpression"];

        string sortDirection = this.GridView_Remember.Attributes["SortDirection"];

        string strSQL;

        if (this.GridView_Remember_Label_tj.Text.Length > 0)
        {
            strSQL = "SELECT * FROM Remember where " + this.GridView_Remember_Label_tj.Text.Trim() + " and iuserid=" + DefaultUser + " ORDER BY ID desc";
        }

        else

        {
            strSQL = "SELECT * FROM Remember where iuserid=" + DefaultUser + " ORDER BY ID desc";
        }

        if (OP_Mode.SQLRUN(strSQL))

        {
            /// 设置排序

            if ((!string.IsNullOrEmpty(sortExpression)) && (!string.IsNullOrEmpty(sortDirection)))

            {
                OP_Mode.Dtv.Sort = string.Format("{0} {1}", sortExpression, sortDirection);
            }

            /// 设置翻页层始终显示



            if (OP_Mode.Dtv.Count == 0)

            {
                OP_Mode.Dtv.AddNew();
            }



            this.GridView_Remember.DataSource = OP_Mode.Dtv;

            this.GridView_Remember.DataBind();

            this.GridView_Remember.BottomPagerRow.Visible = true;
        }

        else

        {
            MessageBox("", strSQL + "<br/>" + OP_Mode.strErrMsg);

            return;
        }
    }
示例#3
0
    private void SendMSGByClassID(int ClassID)
    {
        string Openids = string.Empty;
        string strSQL  = "Select OpenID,Name,STime,ETime,Week from XMFight_Class_Student,XMFight_Student,XMFight_ClassTime where ClassID=" + ClassID + " and StudentID=XMFight_Student.ID and ClassID=XMFight_ClassTime.ID and len(OpenID)>0";

        if (OP_Mode.SQLRUN(strSQL, "Msg"))
        {
            if (OP_Mode.Dtv.Count > 0)
            {
                for (int ii = 0; ii < OP_Mode.Dtv1.Count; ii++)
                {
                    Openids = OP_Mode.Dtv1[ii]["OpenID"].ToString();
                    string strSKSC = "1.5 小时";// 上课时长
                    if (Openids.Length > 5)
                    {
                        string   strSKSJ  = SKSJ(Convert.ToInt32(OP_Mode.Dtv1[ii]["Week"]), Convert.ToDateTime(OP_Mode.Dtv1[ii]["STime"]).ToString("HH:mm"), Convert.ToDateTime(OP_Mode.Dtv1[ii]["ETime"]).ToString("HH:mm"));//上课时间
                        string[] strArray = Openids.Split(';');
                        for (int i = 0; i < strArray.Length; i++)
                        {/// 循环给用户发送信息
                            SendSKTXMsg(strArray[i], OP_Mode.Dtv1[ii]["Name"].ToString(), "自由搏击", strSKSJ, strSKSC, "谢谢您对旭铭搏击的支持,坚持不懈是一种非常好的习惯。", "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf60778eb4d1003de&redirect_uri=http%3A%2F%2Fptweb.x76.com.cn%2FXMFight&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect");
                        }
                    }
                }
                MessageBox("", "班级群发成功。", "/XMFight/Manage/Class.aspx");
                return;
            }
        }
    }
示例#4
0
    private void LoadNews()
    {
        string strSQL  = "Select top 10 * from Fil_News order by Ltime desc";
        string strTemp = string.Empty;

        if (OP_Mode.SQLRUN(strSQL))
        {
            if (OP_Mode.Dtv.Count > 0)
            {
                for (int i = 0; i < OP_Mode.Dtv.Count; i++)
                {
                    strTemp += "<div class=\"well counter\">";
                    if (OP_Mode.Dtv[i]["PicUrl"].ToString().Length > 10)
                    {
                        strTemp += "<img src=\"" + OP_Mode.Dtv[i]["PicUrl"].ToString() + "\" class=\"img-rounded\" width=\"100%\" />";
                        strTemp += "<hr />";
                    }
                    strTemp += "<a href=\"" + OP_Mode.Dtv[i]["Url"].ToString() + "\">" + OP_Mode.Dtv[i]["Title"].ToString() + "</a> " + OP_Mode.Dtv[i]["LTime"].ToString() + "";
                    strTemp += "<hr />";
                    strTemp += OP_Mode.Dtv[i]["Description"].ToString();
                    strTemp += "</div>";
                    strTemp += "<div class=\"hr hr12 dotted\"></div>";
                }
            }
        }

        NewsDiv.InnerHtml = strTemp;
    }
示例#5
0
    /// <summary>
    /// 加载基础数据
    /// </summary>
    private void LoadDefaultData()
    {
        string strSQL  = "Select * from Remember Where ltime>'" + System.DateTime.Now.ToString("yyyy-MM-dd") + "' and NextTime >='" + System.DateTime.Now.AddDays(1).ToString("yyyy-MM-dd") + "' And iUserID=" + DefaultUser + " order by ICount";
        string strTemp = string.Empty;

        if (OP_Mode.SQLRUN(strSQL))
        {
            if (OP_Mode.Dtv.Count > 0)
            {
                for (int i = 0; i < OP_Mode.Dtv.Count; i++)
                {
                    strTemp += "<div class=\"well\">";
                    strTemp += "   <h6 class=\"blue\"> 序号:" + (OP_Mode.Dtv.Count - i).ToString() + " [" + Convert.ToDateTime(OP_Mode.Dtv[i]["LTime"]).ToString("yyyy-MM-dd hh:mm") + "]</h6>";
                    strTemp += "   <h3 class=\"red lighter\">" + OP_Mode.Dtv[i]["CContent"].ToString().Replace("\r\n", "<br/>").Replace("\n", "<br/>") + "</h3>";
                    strTemp += "   <h4 class=\"green\">" + OP_Mode.Dtv[i]["CRemark"].ToString().Replace("\r\n", "<br/>").Replace("\n", "<br/>") + "</h4>";
                    strTemp += "   <h6>" + Convert.ToDateTime(OP_Mode.Dtv[i]["CTime"]).ToString("yyyy-MM-dd") + " 第 1 次背诵,已背诵 " + OP_Mode.Dtv[i]["ICount"].ToString() + " 次。</h6>";
                    strTemp += "   <div class=\"btn-group\">";
                    strTemp += "     <a href=\"RememberAdd.aspx?ID=" + OP_Mode.Dtv[i]["ID"].ToString() + "\" class=\"btn btn-sm btn-info\"><i class=\"icon-edit\"></i>编辑</a>";
                    strTemp += "   </div>";
                    strTemp += "</div>";
                }
                if (strTemp.Length > 0)
                {
                    accordion.InnerHtml = strTemp;
                }
            }
        }
    }
示例#6
0
    /// <summary>
    /// 从System.Data.DataTable导入数据到数据库
    /// </summary>
    /// <param name="dt"></param>
    /// <returns></returns>
    public int InsetData(System.Data.DataTable dt)
    {
        int    i = 0;
        string DB_01 = "", DB_02 = "", DB_03 = "", DB_04 = "", DB_05 = "", DB_06 = "", DB_07 = "", DB_08 = "", DB_09 = "", DB_10 = "";
        string strSQL = string.Empty;

        foreach (DataRow dr in dt.Rows)
        {
            DB_01 = dr[0].ToString().Trim();
            DB_02 = dr[1].ToString().Trim();
            DB_03 = dr[2].ToString().Trim();
            DB_04 = dr[3].ToString().Trim();
            DB_05 = dr[4].ToString().Trim();
            DB_06 = dr[5].ToString().Trim();
            DB_07 = dr[6].ToString().Trim();
            DB_08 = dr[8].ToString().Trim();
            DB_09 = dr[7].ToString().Trim();
            DB_10 = dr[9].ToString().Trim();

            strSQL += " Insert into W_GCGD2 (GCDH,AZWZ,SBBH,SBMC,SBPP,SBXH,JLDW,SL,FS,YQSM,AZFS) Values ('" + Label_GCBH.Text + "','" + DB_01 + "','" + DB_02 + "','" + DB_03 + "','" + DB_04 + "','" + DB_05 + "','" + DB_06 + "'," + DB_07 + "," + DB_08 + ",'" + DB_09 + "'," + DB_10 + ")";

            i++;
        }

        if (!OP_Mode.SQLRUN(strSQL))
        {
            MessageBox("", "错误:" + strSQL);
        }

        return(i);
    }
示例#7
0
    private void LoadUserInfo()
    {
        int iUserID = 0;

        try
        {
            iUserID = Convert.ToInt32(Request.Cookies["WeChat_Fil"]["USERID"]);
        }
        catch
        {
        }
        if (iUserID == 0)
        {
            return;
        }


        string strSQL;

        strSQL = "Select * from FIL_Users where ID = " + iUserID;

        if (OP_Mode.SQLRUN(strSQL))
        {
            if (OP_Mode.Dtv.Count > 0)
            {
                Label_SumFil.Text   = OP_Mode.Dtv[0]["SumFil"].ToString();
                Label_SumPower.Text = OP_Mode.Dtv[0]["SumPower"].ToString();
                Label_Withdraw.Text = OP_Mode.Dtv[0]["WithdrawalFil"].ToString();
                Label_Lock.Text     = OP_Mode.Dtv[0]["LockFil"].ToString();
                Label_Release.Text  = OP_Mode.Dtv[0]["ReleaseFil"].ToString();
            }
        }
    }
示例#8
0
    /// <summary>
    /// 依据ID删除报销明细数据
    /// </summary>
    /// <param name="ID">w_bxd2 ID</param>

    private void DelBXMXData(string ID, int MXID)
    {
        // 删除语句需要判断是否是本人操作。
        string strSQL = string.Empty;

        strSQL += " DECLARE @Cont INT ";

        strSQL += " Select @Cont = count(W_BXD1.ID) from W_BXD1,W_BXD2 where W_BXD1.BXDH=W_BXD2.BXDH and W_BXD2.ID=" + MXID + " and UserName='******' ";

        strSQL += " if @Cont>0 ";
        strSQL += " BEGIN ";
        strSQL += "  Delete From W_BXD2 where ID=" + MXID;
        strSQL += " Select 0,ID from W_BXD1 where BXDH='" + ID + "'";
        strSQL += " End";
        strSQL += " Else";
        strSQL += " BEGIN ";
        strSQL += " Select 1,ID from W_BXD1 where BXDH='" + ID + "'";
        strSQL += " End";
        if (OP_Mode.SQLRUN(strSQL))
        {
            if (OP_Mode.Dtv[0][0].ToString() == "0")
            {
                MessageBox("", "删除成功~", "/CWGL/ReimbursementAdd.ASPX?ID=" + OP_Mode.Dtv[0]["ID"].ToString());
            }
            else
            {
                MessageBox("", "删除失败,您不能删除别人的明细~", "/CWGL/ReimbursementAdd.ASPX?ID=" + OP_Mode.Dtv[0]["ID"].ToString());
            }
        }
    }
示例#9
0
    private void LoadData()
    {
        int iID;

        iID = Convert.ToInt32(Request["ID"]);
        if (iID > 0)
        {
            string strSQL = " SELECT * FROM W_GCGD1 WHERE ID=" + iID;
            if (OP_Mode.SQLRUN(strSQL))
            {
                if (OP_Mode.Dtv.Count > 0)
                {
                    Label_GCBH.Text = OP_Mode.Dtv[0]["GCDH"].ToString();
                    IGDID           = Convert.ToInt32(OP_Mode.Dtv[0]["ID"]);

                    TextBox_GCMC.Text = OP_Mode.Dtv[0]["GCMC"].ToString();
                    TextBox_gcdd.Text = OP_Mode.Dtv[0]["GCDD"].ToString();
                    TextBox_FZR.Text  = OP_Mode.Dtv[0]["JFFZR"].ToString();
                    TextBox_DH.Text   = OP_Mode.Dtv[0]["JFDH"].ToString();
                    TextBox_YQSM.Text = OP_Mode.Dtv[0]["QKSM"].ToString();
                    // Label_YAZFS.Text = OP_Mode.Dtv[0]["YAZFS"].ToString();
                    HiddenField_UserID.Value = OP_Mode.Dtv[0]["ZDRID"].ToString();
                    TextBox_SGBH.Text        = OP_Mode.Dtv[0]["SGDH"].ToString();
                }
            }
        }
    }
示例#10
0
    private void SedMsg(int IZID)
    {
        int iQXZ = IZID;// 判断需要发送的群组的权限组ID

        string strSQL = "Select isnull(cOpenID,'') from S_YH_QXZ,S_USERINFO where QXZID=" + iQXZ.ToString() + " and USERID=id";

        string strUsers = string.Empty; // 需要发送的用户列表用 “|”分割;

        if (OP_Mode.SQLRUN(strSQL))
        {
            if (OP_Mode.Dtv.Count > 0)
            {
                for (int i = 0; i < OP_Mode.Dtv.Count; i++)
                {
                    strUsers += OP_Mode.Dtv[i][0].ToString() + "|";
                }
            }
        }

        if (strUsers.Length > 0)
        {
            try
            {
                int ID = Convert.ToInt32(Request["ID"]);

                SendWorkMsgCard(strUsers, "报销单提交提示", " [" + UserNAME + "] 完成了一张报销单,需要您的审核。", "www.putian.ink/CWGL/ReimbursementAdd.aspx?ID=" + ID + "&WeChat=0");
            }
            catch
            {
            }
        }
    }
示例#11
0
    /// <summary>
    /// 延期
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void GridView_USER_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        string ID = GridView_USER.DataKeys[e.RowIndex].Values[0].ToString();

        int Nian = Convert.ToInt32(DateTime.Now.Year);
        int Yue  = Convert.ToInt32(DateTime.Now.Month);

        if (Yue == 12)
        {
            Yue  = 1;
            Nian = Nian + 1;
        }
        else
        {
            Yue += 1;
        }

        string EndTime = Nian.ToString() + "-" + Yue.ToString() + "-01 00:00:00";

        string strSQL = "Update Hundred set endtime='" + EndTime + "',users='" + UserNAME + "' where ID=" + ID;

        if (OP_Mode.SQLRUN(strSQL))
        {
            MessageBox("", "指定数据延期成功^_^!");

            Load_GridView_USER();
        }
        else
        {
            MessageBox("", "指定数据延期失败,请重试。<br/>" + OP_Mode.strErrMsg);
        }
    }
示例#12
0
 private void AttendClass()
 {
     try
     {
         int iid     = Convert.ToInt32(Request["ID"]);
         int iUserID = Convert.ToInt32(Request.Cookies["Dance"]["USERID"]);
         //int iUserID = 2;
         if (iid > 0)
         {
             string strSQL = "insert into Dance_ClassList(Userid,ClassTime,ClassName,ClassTeacher,AdminUserID) ";
             strSQL += " Select dance_user.id,getdate(),ClassName,ClassTeacher," + iUserID + " from Dance_Arrange,Dance_Class,dance_user where classid=Dance_Class.ID and userid=dance_user.id and Dance_Arrange.ID=" + iid;
             strSQL += " Delete from Dance_Arrange where  ArrangeTime < DATEADD(dd,-1,getdate()) or ID=" + iid;  // 删除过期预约
             if (OP_Mode.SQLRUN(strSQL))
             {
                 MessageBox("", "消课成功。", "/Dance/Manage.aspx");
                 return;
             }
             else
             {
                 MessageBox("", "消课失败,参数错误。<br>请重试。错误:" + OP_Mode.strErrMsg);
                 return;
             }
         }
         else
         {
             MessageBox("", "消课失败,参数错误。<br>请重试。", "/Dance/Manage.aspx");
             return;
         }
     }
     catch
     {
         MessageBox("", "消课失败,参数错误。<br>请重试。", "/Dance/Manage.aspx");
         return;
     }
 }
示例#13
0
    private void GetNewsByWeb()
    {
        string Url = "http://api.tianapi.com/digiccy/index?key=718245142813425a7adab4f1cd4f64b4";

        var client = new System.Net.WebClient();

        client.Encoding = System.Text.Encoding.UTF8;

        var    data  = client.DownloadString(Url);
        var    jo    = (JObject)JsonConvert.DeserializeObject(data);
        JArray data1 = jo.Value <JArray>("newslist");

        Newtonsoft.Json.Linq.JObject js = jo as Newtonsoft.Json.Linq.JObject;//把上面的obj转换为 Jobject对象
        JArray jarray = (JArray)js["newslist"];

        string strSQL = "";

        foreach (var node in jarray)
        {
            NewslistItem itm = JsonConvert.DeserializeObject <NewslistItem>(node.ToString());

            strSQL = "insert into Fil_News(Title,Url,NewsID,PicUrl,Description,LTime) values ('" + itm.title + "','" + itm.url + "','" + itm.id + "','" + itm.picUrl + "','" + itm.description + "','" + itm.ctime + "')";

            if (!OP_Mode.SQLRUN(strSQL))
            {
                // MessageBox("", OP_Mode.strErrMsg);
                break;
            }
        }
    }
示例#14
0
    /// <summary>
    /// 保存标签
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        string strSQL = string.Empty;

        string DB_01 = Content.Text.Trim().Replace("'", "\"");
        string DB_02 = string.Empty;

        int iSelect = 0;

        for (int i = 0; i < CheckBoxList1.Items.Count; i++)
        {
            if (CheckBoxList1.Items[i].Selected)
            {
                iSelect += 1;
                DB_02    = CheckBoxList1.Items[i].Value.ToString();
            }
        }

        if (iSelect > 1 || iSelect == 0)
        {
            MessageBox("", "颜色必须选择一个。");
            return;
        }

        strSQL = "Insert into Remember_Tag (TagName,TagColor,UserID) values ('" + DB_01 + "','" + DB_02 + "'," + DefaultUser + ")";

        if (OP_Mode.SQLRUN(strSQL))
        {
            MessageBox("", "标签添加成功。", "TagAdd.aspx");
        }
        else
        {
            MessageBox("", "标签添加失败,请重试。<br>错误:" + OP_Mode.strErrMsg);
        }
    }
示例#15
0
    /// <summary>
    /// 加载所有标签
    /// </summary>
    private void LoadAllTag()
    {
        string strTemp = string.Empty;
        string strSQL  = "Select * from Remember_Tag Where UserID=" + DefaultUser;

        if (OP_Mode.SQLRUN(strSQL))
        {
            for (int i = 0; i < OP_Mode.Dtv.Count; i++)
            {
                strTemp += "<div class=\"btn-group\">";
                strTemp += "  <button data-toggle=\"dropdown\" class=\"btn btn-" + OP_Mode.Dtv[i]["TagColor"].ToString() + " dropdown-toggle\">";
                strTemp += " " + OP_Mode.Dtv[i]["TagName"].ToString() + " <span class=\"icon-caret-down icon-on-right\"></span>";
                strTemp += "  </button>";
                strTemp += " <ul class=\"dropdown-menu dropdown-default\">";
                strTemp += "  <li>";
                strTemp += "    <a href=\"TagAdd.aspx?DelID=" + OP_Mode.Dtv[i]["ID"].ToString() + "\" >删除标签</a></li>";
                strTemp += " </ul>";
                strTemp += "</div>";
            }
        }

        if (strTemp.Length > 0)
        {
            PTag.InnerHtml = strTemp;
        }
    }
示例#16
0
    protected void GridView_Info_RowUpdating(object sender, GridViewUpdateEventArgs e)

    {
        string ID = GridView_Info.DataKeys[e.RowIndex].Values[0].ToString();

        /// 模块名称


        string DB_02 = ((TextBox)GridView_Info.Rows[e.RowIndex].Cells[2].Controls[0]).Text.ToString().Replace("'", "\"");

        string strSQL = string.Empty;

        strSQL = "Update Hundred SET EndTime='" + DB_02 + "' WHERE ID=" + ID;

        if (OP_Mode.SQLRUN(strSQL))

        {
            MessageBox("", "数据更新成功!");
        }

        else

        {
            MessageBox("", "数据更新失败!<br/>错误:" + OP_Mode.strErrMsg);

            return;
        }

        GridView_Info.SelectedIndex = -1;

        GridView_Info.EditIndex = -1;

        Load_GridView_Info();
    }
示例#17
0
    /// <summary>
    /// 依据学生ID获取学生信息
    /// </summary>
    /// <param name="iStudentID"></param>
    private void LoadData(int iStudentID)
    {
        string strSQL = string.Empty;

        strSQL  = " Select ID, Name, Sex, Remark, Tel, BrithDay, datediff(year, BrithDay, getdate()) age,HeadImg";
        strSQL += " ,sumClassCount,LastClassTime,";
        strSQL += " isnull((Select Count(ID) from XMFight_Class_Record where IFlag=2 and StudentID = a.ID),0) Leave,";
        strSQL += " isnull((Select Count(ID) from XMFight_Class_Record where IFlag=3 and StudentID = a.ID),0) Absenteeism,";
        strSQL += " isnull((Select sum(Bance) from XMFight_reserve where StudentID=a.ID),0) SumBance";
        strSQL += " from XMFight_Student a,";
        strSQL += " (Select sum(ICount) sumClassCount, MAX(CTime) LastClassTime, StudentID from XMFight_Class_Record group by StudentID) as b";
        strSQL += " where a.ID = b.StudentID and a.id=" + iStudentID;
        strSQL += " order by Name";

        if (OP_Mode.SQLRUN(strSQL))
        {
            if (OP_Mode.Dtv.Count > 0)
            {
                Label_Sum.Text = Convert.ToDouble(OP_Mode.Dtv[0]["sumClassCount"]).ToString("G0");
                Label_KG.Text  = OP_Mode.Dtv[0]["Absenteeism"].ToString();
                Label_QJ.Text  = OP_Mode.Dtv[0]["Leave"].ToString();
                Label_CBJ.Text = OP_Mode.Dtv[0]["SumBance"].ToString();
            }
        }
    }
示例#18
0
    /// <summary>
    /// 整单删除
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        if (Label_No.Text.Length < 18)
        {
            return;
        }
        if (UserNAME != Label_CName.Text)
        {
            MessageBox("", "您不允许删除别人的单据。");
            return;
        }
        if (Label_Flag.Text != "待提交")
        {
            MessageBox("", "已经提交的单据是不允许删除的。");
            return;
        }
        string strSQL = "Delete w_bxd2 from w_bxd1,w_bxd2 where w_bxd1.BXDH=w_bxd2.BXDH and w_bxd1.bxdh='" + Label_No.Text + "' ";

        strSQL += " Delete from w_bxd1 where bxdh='" + Label_No.Text + "'";

        if (OP_Mode.SQLRUN(strSQL))
        {
            MessageBox("", "单据删除成功。", "/CWGL/");
            return;
        }
        else
        {
            MessageBox("", "单据删除错误。<br>" + OP_Mode.strErrMsg);
            return;
        }
    }
示例#19
0
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "GridView1_Save")
        {
            string strSQL;

            if (GridView_Report.SelectedIndex > -1)
            {
                strSQL = " Delete from S_REPORT_QXZ where IREPORTID=" + GridView_Report.SelectedDataKey[0].ToString() + " ";

                string stemp = string.Empty;

                for (int i = 0; i <= GridView1.Rows.Count - 1; i++)
                {
                    CheckBox chkbox = (CheckBox)this.GridView1.Rows[i].FindControl("CheckBox1") as CheckBox;

                    if (chkbox.Checked)
                    {
                        strSQL += " INSERT INTO S_REPORT_QXZ (IREPORTID,IQXZID) VALUES (" + this.GridView_Report.DataKeys[GridView_Report.SelectedIndex].Value.ToString().Replace("'", "\"") + "," + this.GridView1.DataKeys[i].Value.ToString().Replace("'", "\"") + ") ";
                    }
                }

                if (!OP_Mode.SQLRUN(strSQL))
                {
                    MessageBox(UpdatePanel1, "", "保存错误。<br/>错误:" + OP_Mode.strErrMsg);
                }
                else
                {
                    MessageBox(UpdatePanel1, "", "权限组分配成功!");
                }
            }
        }
    }
示例#20
0
    /// <summary>
    /// 输出HTML列表样式
    /// </summary>
    private string LoadHtmlGrid()
    {
        string rValue = string.Empty;

        string strSQL = string.Empty;

        strSQL = "SELECT S_BJ.ID,KCMC+BJMC BJMC FROM S_BJ,S_KC WHERE KCID=S_KC.ID AND S_BJ.FLAG=0 AND S_BJ.DEL=0";

        if (OP_Mode.SQLRUN(strSQL))
        {
            if (OP_Mode.Dtv.Count > 0)
            {
                for (int i = 0; i < OP_Mode.Dtv.Count; i++)
                {
                    rValue += " <div class=\"infobox infobox-green\">";
                    rValue += "     <div class=\"infobox-icon\">";
                    rValue += "      <i class=\"icon-group\"></i>";
                    rValue += "     </div>";
                    rValue += "     <div class=\"infobox-data\">";
                    rValue += "         <span class=\"infobox-data-number\">" + OP_Mode.Dtv[i]["BJMC"].ToString().Substring(OP_Mode.Dtv[i]["BJMC"].ToString().Length - 6) + "</span>";
                    rValue += "         <div class=\"infobox-content\">";
                    rValue += "             <a href=\"/JYJG/Student.aspx?ClassID=" + OP_Mode.Dtv[i]["ID"].ToString() + "\">55 人</a>&nbsp;&nbsp;&nbsp;&nbsp;陈老师&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"/JYJG/ClassEdit.aspx?ID=" + OP_Mode.Dtv[i]["ID"].ToString() + "\"><i class=\"icon-edit\"></i></a>";
                    rValue += "      </div>";
                    rValue += "     </div>";
                    rValue += " </div>";
                }
            }
        }
        return(rValue);
    }
示例#21
0
    private void LoadMSGINFO()
    {
        try
        {
            if (Convert.ToInt32(Request["ID"]) > 0)
            {
                int    TID    = Convert.ToInt32(Request["ID"]);
                string strSQL = string.Empty;

                strSQL  = " update S_MSG_YD set iyd=1,LTime=getdate() where imsgid=" + TID + " and isendid=" + DefaultUser + " ";
                strSQL += "SELECT top 1 IYD,CTITLE,CCONTENT,S_MSG.CTIME,CNAME,(SELECT COUNT(ID) FROM S_MSG_YD WHERE IMSGID=1 AND IYD=1) YYD,(SELECT COUNT(ID) FROM S_MSG_YD WHERE IMSGID=1) ZYD FROM S_MSG,S_MSG_YD,S_USERINFO WHERE S_MSG.ID=" + TID + " AND S_MSG.ID=S_MSG_YD.IMSGID AND S_MSG_YD.ISENDID=" + DefaultUser + " AND S_MSG.IUSERID=S_USERINFO.ID ";


                if (OP_Mode.SQLRUN(strSQL))
                {
                    if (OP_Mode.Dtv.Count > 0)
                    {
                        Label_Title.Text     = OP_Mode.Dtv[0]["CTITLE"].ToString();
                        DivContent.InnerHtml = OP_Mode.Dtv[0]["CCONTENT"].ToString();
                        Label1.Text          = "&nbsp;&nbsp; <a href='/MSG/MSGYD.ASPX?ID=" + TID + "'>" + OP_Mode.Dtv[0]["YYD"].ToString() + "/" + OP_Mode.Dtv[0]["ZYD"].ToString() + "</a> " + OP_Mode.Dtv[0]["CNAME"].ToString() + "( " + Convert.ToDateTime(OP_Mode.Dtv[0]["CTIME"]).ToString("yyyy-MM-dd") + " )";
                    }
                }
            }
            else
            {
                MessageBox("", "非法操作!请重试。", "./");
            }
        }
        catch
        {
            MessageBox("", "非法操作!请重试。<br> 错误:" + OP_Mode.strErrMsg, "./");
        }
    }
示例#22
0
    /// <summary>
    /// 提交状态
    /// </summary>
    private void SaveFlag()
    {
        int ID = Convert.ToInt32(Request["ID"]);

        if (ID > 0)
        {                    /// 单据编号不对,不允许提交
            // 保存记录表  W_Examine
            int NewFlag = 0; // 提交后他状态

            string strSQL = " Insert into W_Examine(Class,DJBH,UserName,OldFlag,NewFlag,Remark,iReturn) values ('BXD',(Select BXDH From w_bxd1 where ID=" + ID + "),'" + UserNAME + "',(Select flag From w_bxd1 where ID=" + ID + ")," + NewFlag + ",'" + UserNAME + ":" + TextBox_ReturnMSG.Text.Replace("'", "") + "',1)";

            strSQL += " Update W_BXD1 Set Flag=" + NewFlag + ",LTime=getdate() where ID=" + ID;
            strSQL += " Select cOpenID from W_BXD1,S_USERINFO where W_BXD1.UserName=S_USERINFO.CNAME and W_BXD1.ID=" + ID;

            if (OP_Mode.SQLRUN(strSQL))
            {
                if (OP_Mode.Dtv.Count > 0)
                {
                    SendWorkMsgCard(OP_Mode.Dtv[0][0].ToString(), "报销单退回提示", " 您的报销单被[" + UserNAME + "]退回,请修改后重新提交。", "http://ptweb.x76.com.cn/CWGL/ReimbursementAdd.aspx?ID=" + ID + "&WeChat=0");
                }
                MessageBox("", "单据退回成功。", "/CWGL/");
            }
            else
            {
                MessageBox("", "单据退回失败。<br>错误:" + OP_Mode.strErrMsg);
                return;
            }
        }
        else
        {
            MessageBox("", "单据退回失败。<br>错误:参数错误。");
            return;
        }
    }
示例#23
0
    /// <summary>

    /// 模块列表读取

    /// </summary>

    private void Load_GridView_USER()

    {
        // 获取GridView排序数据列及排序方向

        string sortExpression = this.GridView_USER.Attributes["SortExpression"];

        string sortDirection = this.GridView_USER.Attributes["SortDirection"];

        string strSQL;

        if (this.GridView_USER_Label_tj.Text.Length > 0)

        {
            strSQL = "SELECT * FROM Hundred where " + this.GridView_USER_Label_tj.Text.Trim() + " AND ((USERS IS NULL OR USERS='" + UserNAME + "') OR ('" + UserNAME + "'='陆晓钧')) ORDER BY ID";
        }

        else

        {
            strSQL = "SELECT * FROM Hundred where (USERS IS NULL OR USERS='" + UserNAME + "') OR ('" + UserNAME + "'='陆晓钧') ORDER BY ID";
        }

        if (OP_Mode.SQLRUN(strSQL))

        {
            /// 设置排序

            if ((!string.IsNullOrEmpty(sortExpression)) && (!string.IsNullOrEmpty(sortDirection)))

            {
                OP_Mode.Dtv.Sort = string.Format("{0} {1}", sortExpression, sortDirection);
            }

            /// 设置翻页层始终显示



            if (OP_Mode.Dtv.Count == 0)

            {
                OP_Mode.Dtv.AddNew();
            }



            this.GridView_USER.DataSource = OP_Mode.Dtv;

            this.GridView_USER.DataBind();
        }

        else

        {
            MessageBox("", strSQL + "<br/>" + OP_Mode.strErrMsg);

            return;
        }
    }
示例#24
0
    /// <summary>

    /// 模块列表读取

    /// </summary>

    private void Load_GridView1()

    {
        // 获取GridView排序数据列及排序方向

        string sortExpression = this.GridView1.Attributes["SortExpression"];

        string sortDirection = this.GridView1.Attributes["SortDirection"];

        string strSQL;

        if (this.GridView1_Label_tj.Text.Length > 0)

        {
            strSQL = "Select * from(SELECT Top 1000 (Select count(id) from W_GCGD_USERS where GCDID=W_GCGD1.ID) Selected,isnull((Select sum(W_GCGD_FS.FS*W_GCGD2.FS/100 + W_GCGD_FS.AZFS*W_GCGD2.AZFS/100) from W_GCGD_FS,W_GCGD1 as g,W_GCGD2 where GCMXID=W_GCGD2.id and g.GCDH=W_GCGD2.GCDH and (W_GCGD_FS.FS>0 or W_GCGD_FS.AZFS>0) and g.ID=W_GCGD1.ID),0) SumFS,W_GCGD1.*,CNAME FROM W_GCGD1,S_USERINFO where " + this.GridView1_Label_tj.Text.Trim() + " AND ZDRID=S_USERINFO.ID ORDER BY ID desc) a where a.sumfs>0";
        }

        else

        {
            strSQL = "Select * from(SELECT Top 1000 (Select count(id) from W_GCGD_USERS where GCDID=W_GCGD1.ID) Selected,isnull((Select sum(W_GCGD_FS.FS*W_GCGD2.FS/100 + W_GCGD_FS.AZFS*W_GCGD2.AZFS/100) from W_GCGD_FS,W_GCGD1 as g,W_GCGD2 where GCMXID=W_GCGD2.id and g.GCDH=W_GCGD2.GCDH and (W_GCGD_FS.FS>0 or W_GCGD_FS.AZFS>0) and g.ID=W_GCGD1.ID),0) SumFS,W_GCGD1.*,CNAME FROM W_GCGD1,S_USERINFO where ZDRID=S_USERINFO.ID ORDER BY W_GCGD1.ID desc) a where a.sumfs>0";
        }

        if (OP_Mode.SQLRUN(strSQL))

        {
            /// 设置排序

            if ((!string.IsNullOrEmpty(sortExpression)) && (!string.IsNullOrEmpty(sortDirection)))

            {
                OP_Mode.Dtv.Sort = string.Format("{0} {1}", sortExpression, sortDirection);
            }

            /// 设置翻页层始终显示



            if (OP_Mode.Dtv.Count == 0)

            {
                OP_Mode.Dtv.AddNew();
            }



            this.GridView1.DataSource = OP_Mode.Dtv;

            this.GridView1.DataBind();
        }

        else

        {
            MessageBox("", strSQL + "<br/>" + OP_Mode.strErrMsg);

            return;
        }
    }
示例#25
0
    /// <summary>

    /// 模块列表读取

    /// </summary>

    private void Load_GridView_Game()

    {
        // 获取GridView排序数据列及排序方向

        string sortExpression = this.GridView_Game.Attributes["SortExpression"];

        string sortDirection = this.GridView_Game.Attributes["SortDirection"];

        string strSQL;

        if (this.GridView_Game_Label_tj.Text.Length > 0)

        {
            strSQL = "SELECT * FROM BBGameData where " + this.GridView_Game_Label_tj.Text.Trim() + " and timekey<>'0' ORDER BY JQName,LTIME";
        }

        else

        {
            strSQL = "SELECT * FROM BBGameData where timekey<>'0' ORDER BY JQName,LTIME";
        }

        if (OP_Mode.SQLRUN(strSQL))

        {
            /// 设置排序

            if ((!string.IsNullOrEmpty(sortExpression)) && (!string.IsNullOrEmpty(sortDirection)))

            {
                OP_Mode.Dtv.Sort = string.Format("{0} {1}", sortExpression, sortDirection);
            }

            /// 设置翻页层始终显示



            if (OP_Mode.Dtv.Count == 0)

            {
                OP_Mode.Dtv.AddNew();
            }



            this.GridView_Game.DataSource = OP_Mode.Dtv;

            this.GridView_Game.DataBind();
        }

        else

        {
            MessageBox("", strSQL + "<br/>" + OP_Mode.strErrMsg);

            return;
        }
    }
示例#26
0
    /// <summary>

    /// 模块数据保存

    /// </summary>

    /// <param name="sender"></param>

    /// <param name="e"></param>

    protected void GridView_Winner_LinkButton1_Click(object sender, EventArgs e)

    {
        /// 存款金额

        string DB_01 = this.GridView_Winner_TextBox_CKJE.Text.Trim().Replace("'", "\"");

        /// 取款金额

        string DB_02 = this.GridView_Winner_TextBox_QKJE.Text.Trim().Replace("'", "\"");

        /// 打码量

        string DB_03 = this.GridView_Winner_TextBox_DML.Text.Trim().Replace("'", "\"");

        /// 特别号金额

        string DB_04 = this.GridView_Winner_TextBox_TBHJE.Text.Trim().Replace("'", "\"");

        /// 反水比例

        string DB_05 = this.GridView_Winner_TextBox_FSBL.Text.Trim().Replace("'", "\"");

        /// 日期

        string DB_06 = this.GridView_Winner_TextBox_RQ.Text.Trim().Replace("'", "\"");
        /// 卡号数字

        string DB_07 = this.TextBox_CardNo.Text.Trim().Replace("'", "\"");

        if (!(DB_01.Length > 0))

        {
            MessageBox("", "登录名称不允许为空!<br/>请认真填写。");

            return;
        }

        string strSQL;

        strSQL = "Insert into Winner ( CKJE, QKJE, DML, TBHJE, FSBL, RQ,CTIME,USERID,CARDNO) VALUES ('" + DB_01 + "','" + DB_02 + "','" + DB_03 + "','" + DB_04 + "','" + DB_05 + "','" + DB_06 + "',GETDATE()," + DefaultUser + "," + DB_07 + ") ";

        if (OP_Mode.SQLRUN(strSQL))

        {
            MessageBox("", "盈利记录信息添加成功!", Request.Url.LocalPath);
        }

        else

        {
            MessageBox("", "盈利记录信息添加失败!<br/>错误:" + OP_Mode.strErrMsg);

            return;
        }

        Load_GridView_Winner();
    }
示例#27
0
    /// <summary>
    /// 加载基础数据
    /// </summary>
    /// <param name="strID"></param>
    private void LoadData(int strID)
    {
        string strSQL = "Select * from Question_Info Where id=" + strID;

        if (OP_Mode.SQLRUN(strSQL))
        {
            if (OP_Mode.Dtv.Count > 0)
            {
                string Db01 = OP_Mode.Dtv[0][1 + 2].ToString();
                string Db02 = OP_Mode.Dtv[0][2 + 2].ToString();
                string Db03 = OP_Mode.Dtv[0][3 + 2].ToString();
                string Db04 = OP_Mode.Dtv[0][4 + 2].ToString();
                string Db05 = OP_Mode.Dtv[0][5 + 2].ToString();
                string Db06 = OP_Mode.Dtv[0][6 + 2].ToString();
                string Db07 = OP_Mode.Dtv[0][7 + 2].ToString();
                string Db08 = OP_Mode.Dtv[0][8 + 2].ToString();
                string Db09 = OP_Mode.Dtv[0][9 + 2].ToString();
                string Db10 = OP_Mode.Dtv[0][10 + 2].ToString();
                string Db11 = OP_Mode.Dtv[0][11 + 2].ToString();
                string Db12 = OP_Mode.Dtv[0][12 + 2].ToString();
                string Db13 = OP_Mode.Dtv[0][13 + 2].ToString();
                string Db14 = OP_Mode.Dtv[0][14 + 2].ToString();
                string Db15 = OP_Mode.Dtv[0][15 + 2].ToString();
                string Db16 = OP_Mode.Dtv[0][16 + 2].ToString();
                string Db17 = OP_Mode.Dtv[0][17 + 2].ToString();
                string Db18 = OP_Mode.Dtv[0][18 + 2].ToString();
                string Db19 = OP_Mode.Dtv[0][19 + 2].ToString();
                string Db20 = OP_Mode.Dtv[0][21 + 2].ToString();

                TextBox_XZ.Text   = Db01;
                TextBox_Name.Text = Db02;
                TextBox_SQ.Text   = Db03;
                TextBox_XQ.Text   = Db04;
                TextBox_MPH.Text  = Db05;
                TextBox_ZJNO.Text = Db06;
                TextBox_HJD.Text  = Db07;
                TextBox_DW.Text   = Db08;

                RadioButtonList_ZZMM.SelectedValue = Db09;

                TextBox_LXDH.Text = Db10;

                RadioButtonList1.SelectedValue   = Db11; //RadioButtonList1 是否接种
                RadioButtonList_JZ.SelectedValue = Db12; // RadioButtonList_JZ 接种剂次

                TextBox_JZDD.Text = Db13;
                TextBox_WZYY.Text = Db14;

                RadioButtonList_ZY.SelectedValue = Db15;// RadioButtonList_ZY志愿服务

                TextBox_QTDZ.Text   = Db16;
                TextBox_WGY.Text    = Db17;
                TextBox_LDZ.Text    = Db18;
                TextBox_Remark.Text = Db19;
                Label_LTime.Text    = Db20; /// 更新时间
            }
        }
    }
示例#28
0
    /// <summary>

    /// 模块列表读取

    /// </summary>

    private void Load_GridView_Game()

    {
        // 获取GridView排序数据列及排序方向

        string sortExpression = this.GridView_Game.Attributes["SortExpression"];

        string sortDirection = this.GridView_Game.Attributes["SortDirection"];

        string strSQL;

        string strName = HttpUtility.UrlDecode(Request.Cookies[Constant.COOKIENAMEUSER][Constant.COOKIENAMEUSER_CNAME], Encoding.GetEncoding("UTF-8"));

        if (strName == "joker")
        {
            strSQL = "Select * from BBGameData where id in (SELECT max(ID) FROM BBGameData group by JQName) and ys>0 order by jqname";
        }
        else
        {
            strSQL = "Select * from BBGameData where id in (SELECT max(ID) FROM BBGameData where JQNAME LIKE '" + strName + "%' group by JQName) and ys>0 order by jqname";
        }

        if (OP_Mode.SQLRUN(strSQL))

        {
            /// 设置排序

            if ((!string.IsNullOrEmpty(sortExpression)) && (!string.IsNullOrEmpty(sortDirection)))

            {
                OP_Mode.Dtv.Sort = string.Format("{0} {1}", sortExpression, sortDirection);
            }

            /// 设置翻页层始终显示



            if (OP_Mode.Dtv.Count == 0)

            {
                OP_Mode.Dtv.AddNew();
            }



            this.GridView_Game.DataSource = OP_Mode.Dtv;

            this.GridView_Game.DataBind();
        }

        else

        {
            MessageBox("", strSQL + "<br/>" + OP_Mode.strErrMsg);

            return;
        }
    }
示例#29
0
    /// <summary>

    /// 模块列表读取

    /// </summary>

    private void Load_GridView_YD()

    {
        // 获取GridView排序数据列及排序方向

        string sortExpression = this.GridView_YD.Attributes["SortExpression"];

        string sortDirection = this.GridView_YD.Attributes["SortDirection"];

        try
        {
            if (Convert.ToInt32(Request["ID"]) > 0)
            {
                int    TID    = Convert.ToInt32(Request["ID"]);
                string strSQL = string.Empty;

                strSQL = "SELECT S_MSG_YD.ID,CNAME,S_MSG_YD.LTime FROM S_MSG_YD,S_USERINFO WHERE IMSGID=" + TID + " AND IYD=0 and S_USERINFO.ID=iSendID ORDER BY S_MSG_YD.LTime";
                if (OP_Mode.SQLRUN(strSQL))

                {
                    /// 设置排序

                    if ((!string.IsNullOrEmpty(sortExpression)) && (!string.IsNullOrEmpty(sortDirection)))

                    {
                        OP_Mode.Dtv.Sort = string.Format("{0} {1}", sortExpression, sortDirection);
                    }

                    /// 设置翻页层始终显示



                    if (OP_Mode.Dtv.Count == 0)

                    {
                        OP_Mode.Dtv.AddNew();
                    }



                    this.GridView_YD.DataSource = OP_Mode.Dtv;

                    this.GridView_YD.DataBind();
                }

                else

                {
                    MessageBox("", strSQL + "<br/>" + OP_Mode.strErrMsg);

                    return;
                }
            }
        }
        catch
        {
        }
    }
示例#30
0
    private void LoadAttend()
    {
        int iUserID;

        try
        {
            iUserID = Convert.ToInt32(Request.Cookies["Dance"]["USERID"]);

            // iUserID = 2;

            if (iUserID <= 0)
            {
                MessageBox("", "用户信息获取失败,请重试。", "/Dance/");
                return;
            }
        }
        catch
        {
            MessageBox("", "用户信息获取失败,请重试。", "/Dance/");
            return;
        }
        string strTemp = string.Empty;

        string strSQL = "Select (Select sum(numhour) NumHour from Dance_ClassList where Userid=" + iUserID + ") NumHour,* from Dance_ClassList where Userid=" + iUserID + " order by ClassTime";

        if (OP_Mode.SQLRUN(strSQL))
        {
            if (OP_Mode.Dtv.Count > 0)
            {
                Label_Count.Text = OP_Mode.Dtv[0]["NumHour"].ToString();
                for (int i = 0; i < OP_Mode.Dtv.Count; i++)
                {
                    strTemp += "  <div class=\"dialogs\">";
                    strTemp += "            <div class=\"itemdiv dialogdiv\">";
                    strTemp += "               <div class=\"user\">";
                    strTemp += "                   <img src =\"/images/DanceLogo.jpg\" />";
                    strTemp += "               </div >";
                    strTemp += "               <div class=\"body\">";
                    strTemp += "                 <div class=\"time\">";
                    strTemp += "                     <i class=\"icon-time\"></i>";
                    strTemp += "                      <span class=\"green\">" + Convert.ToDateTime(OP_Mode.Dtv[i]["ClassTime"]).ToString() + "</ span > ";
                    strTemp += "                  </div>";
                    strTemp += "                  <div class=\"name\">";
                    strTemp += "                     <a href=\"#\"> " + OP_Mode.Dtv[i]["ClassTeacher"].ToString() + " </a>";
                    strTemp += "                  </div>";
                    strTemp += "                <div class=\"text\">" + OP_Mode.Dtv[i]["classname"].ToString() + " </div>";
                    strTemp += "               </div>";
                    strTemp += "           </div>";
                    strTemp += "           </div>";
                }
            }
            if (strTemp.Length > 0)
            {
                AttendList.InnerHtml = strTemp;
            }
        }
    }