//删除新闻
        protected void lbtnDelete_Click(object sender, EventArgs e)
        {
            int role_id = Convert.ToInt32(Session[Constant.roleID].ToString());

            if (role_id == 4 || role_id == 3)
            {
                String message = "对不起,您没有相应权限";
                MyUtil.ShowMessage(this.Page, message);
                return;
            }
            else
            {
                int success = 0;
                for (int i = 0; i < gvwData.Rows.Count; i++)
                {
                    CheckBox cbx = (CheckBox)gvwData.Rows[i].FindControl("chkbOne");
                    if (cbx.Checked == true)
                    {
                        int id        = Convert.ToInt32(gvwData.DataKeys[i].Value);
                        int source_id = news_bll.GetSourceById(id);
                        aca_bll.ReUpdateRank(source_id);
                        news_bll.DeleteNews(id);
                        success++;
                    }
                }
                bindData();
                String message = "成功删除" + success + "条记录!";
                MyUtil.ShowMessage(this, message);
            }
        }
Exemplo n.º 2
0
        protected void lbtnSave_Click(object sender, EventArgs e)
        {
            int content_id = Convert.ToInt32(ViewState["content_id"].ToString());
            YouthSpecialSubContent original_model = bll.GetListById(content_id);

            model.Content_id           = content_id;
            model.Special_id           = Convert.ToInt32(ddl_special.SelectedValue);
            model.Sub_id               = Convert.ToInt32(ddl_sub.SelectedValue);
            model.Content_title        = txtTitle.Text.ToString();
            model.Content_content      = txtContent.Text.ToString();
            model.Content_publisher    = txt_publisher.Text.ToString();
            model.Content_phone        = txt_phone.Text.ToString();
            model.Content_email        = txt_email.Text.ToString();
            model.Content_publish_time = original_model.Content_publish_time;
            model.Content_click_times  = Convert.ToInt32(txt_click.Text.ToString());
            model.Content_source       = Convert.ToInt32(ddl_source.SelectedValue);
            model.Last_updater         = Session[Constant.adminName].ToString();
            model.Last_update_time     = DateTime.Today;
            model.Is_check             = "N";
            model.Checker              = "";
            model.Check_time           = original_model.Check_time;
            model.Rechecker            = "";
            model.Recheck_time         = original_model.Recheck_time;
            if (bll.UpdContent(model))
            {
                MyUtil.ShowMessageRedirect(this.Page, "编辑成功", "spe_sub_conItemList.aspx");
            }
            else
            {
                MyUtil.ShowMessage(this.Page, "编辑失败");
            }
        }
Exemplo n.º 3
0
    // ランダムなルームの入室に失敗した場合
    public override void OnJoinRandomFailed(short returnCode, string message)
    {
        logManager.WriteLog("他に探検者はいないようだ...");

        // ルームがないと入室に失敗するため、その時は自分で作る。引数はルーム名
        PhotonNetwork.CreateRoom(MyUtil.GetNowAbsSeconds().ToString());
    }
        protected void lbtnSave_Click(object sender, EventArgs e)
        {
            YouthSpecialSubContent model = new YouthSpecialSubContent();

            model.Special_id           = Convert.ToInt32(ddl_special.SelectedValue);
            model.Sub_id               = Convert.ToInt32(ddl_sub.SelectedValue);
            model.Content_title        = txtTitle.Text.ToString();
            model.Content_content      = txt_content.Text.ToString();
            model.Content_publisher    = txt_publisher.Text.ToString();
            model.Content_email        = txt_email.Text.ToString();
            model.Content_phone        = txt_phone.Text.ToString();
            model.Content_publish_time = DateTime.Today;
            model.Content_click_times  = 0;
            model.Content_source       = Convert.ToInt32(ddl_source.SelectedValue);
            model.Last_updater         = "";
            model.Last_update_time     = DateTime.Today;
            model.Is_check             = "N";
            model.Checker              = "";
            model.Check_time           = DateTime.Today;
            model.Rechecker            = "";
            model.Recheck_time         = DateTime.Today;
            if (bll.AddContent(model))
            {
                MyUtil.ShowMessageRedirect(this.Page, "添加成功", "spe_sub_conItemList.aspx");
            }
            else
            {
                MyUtil.ShowMessage(this.Page, "添加失败");
            }
        }
Exemplo n.º 5
0
 protected void BindData()
 {
     pageTotal            = MyUtil.GetCount("tbArrange,tbSubject,tbPaper", "tbArrange.subjectid=tbSubject.id and tbArrange.paperid=tbPaper.id", GetWhereSql());
     gvwData.DataSource   = MyUtil.GetListByIndex(pageSize, pageIndex, "tbArrange.*,subjectname,papertitle", "tbArrange,tbSubject,tbPaper", "tbArrange.subjectid=tbSubject.id and tbArrange.paperid=tbPaper.id", GetWhereSql(), "tbArrange.id desc");
     gvwData.DataKeyNames = new String[] { "id" };
     gvwData.DataBind();
 }
 protected void btn_submit_Click(object sender, EventArgs e)
 {
     model.Reception_name = tg_zz.Text;
     if (male.Checked == true)
     {
         model.Reception_sex = male.Text;
     }
     else if (female.Checked == true)
     {
         model.Reception_sex = female.Text;
     }
     model.Reception_homepage = txt_homepage.Text;
     model.Reception_email    = tg_yx.Text;
     model.Reception_qq       = txt_qq.Text;
     model.Reception_title    = tg_bt.Text;
     model.Reception_content  = tg_nr.Text;
     model.Reception_time     = DateTime.Today;
     model.Is_reply           = "N";
     model.Reception_type_id  = Convert.ToInt32(ddl_type.SelectedValue);
     if (bll.AddReception(model))
     {
         MyUtil.ShowMessageRedirect(this.Page, "留言提交成功,请等待回复", "youth_meetingroom.aspx");
     }
     else
     {
         MyUtil.ShowMessage(this.Page, "提交失败");
     }
 }
Exemplo n.º 7
0
        //冻结与解冻账号
        protected void lbtnOper_Click(object sender, EventArgs e)
        {
            LinkButton lbtn    = (LinkButton)sender;
            int        user_id = Convert.ToInt32(lbtn.CommandArgument);

            AUTO.Model.YouthUsers model = new Model.YouthUsers();
            model = user_bll.GetUserById(user_id);
            if (model.User_status.Trim().ToString().Equals("Y"))
            {
                //冻结账号
                model.User_id     = user_id;
                model.User_status = "N";
                if (user_bll.FrezzeUsers(model))
                {
                    //冻结成功
                    MyUtil.ShowMessage(this.Page, "成功冻结账号");
                    bindUsers();
                }
            }
            else
            {
                //解冻账号
                model.User_id     = user_id;
                model.User_status = "Y";
                if (user_bll.FrezzeUsers(model))
                {
                    //解冻成功
                    MyUtil.ShowMessage(this.Page, "成功解冻账号");
                    bindUsers();
                }
            }
        }
Exemplo n.º 8
0
 protected void BindData()
 {
     pageTotal            = MyUtil.GetCount("tbUser left join tbClass on tbUser.classid=tbClass.id", "1=1", GetWhereSql());
     gvwData.DataSource   = MyUtil.GetListByIndex3(pageSize, pageIndex, "tbUser.*,tbClass.classname", "tbUser left join tbClass on tbUser.classid=tbClass.id", "1=1", GetWhereSql(), "tbUser.id");
     gvwData.DataKeyNames = new String[] { "id" };
     gvwData.DataBind();
 }
Exemplo n.º 9
0
    /// <summary>
    /// 删除所选
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void lbtnDelete_Click(object sender, EventArgs e)
    {
        int countSuccess = 0;
        int countFail    = 0;

        for (int i = 0; i < gvwData.Rows.Count; i++)
        {
            CheckBox cbx = (CheckBox)gvwData.Rows[i].FindControl("chkbOne");
            if (cbx.Checked == true)
            {
                int  userid    = Convert.ToInt32(gvwData.DataKeys[i].Values[0]);
                int  subjectid = Convert.ToInt32(gvwData.DataKeys[i].Values[1]);
                bool b         = this.DeleteGrant(userid, subjectid);
                if (b == true)
                {
                    countSuccess++;
                }
                else
                {
                    countFail++;
                }
            }
        }

        String message = "成功删除" + countSuccess + "条记录!";

        if (countFail != 0)
        {
            message += "<br/>还存在" + countFail + "条记录删除失败!";
        }
        MyUtil.ShowMessage(this, message);
        BindData();
    }
Exemplo n.º 10
0
    /// <summary>
    /// テキストデータから数値の読み込み
    /// </summary>
    /// <returns></returns>
    private int ReadNumber()
    {
        // セリフのテキストデータの先頭の数字を数値に変換
        double d = 0;

        if (double.TryParse(this.text.Substring(0, 1), out d))
        {
            // 数値を調整
            d =
                Mathf.Clamp(
                    (int)d,
                    0,
                    9
                    );

            // セリフのテキストデータから先頭の文字を削除
            this.text = this.text.Remove(0, 1);



            // 数値を返す
            return((int)d);
        }



        MyUtil.ErrorLog("データを正しく読み込めませんでした。");



        return(-1);
    }
Exemplo n.º 11
0
        //设置首页banner
        protected void lbtnChange_Click(object sender, EventArgs e)
        {
            int flag = 0;

            for (int i = 0; i < gvwData.Rows.Count; i++)
            {
                CheckBox cbx = (CheckBox)gvwData.Rows[i].FindControl("chkbOne");
                if (cbx.Checked == true)
                {
                    flag++;
                    if (flag > 1)
                    {
                        MyUtil.ShowMessage(this, "仅能首页显示一个banner,请重新操作");
                        return;
                    }
                    else
                    {
                        int id = Convert.ToInt32(gvwData.DataKeys[i].Value);
                        model.Is_banner  = "Y";
                        model.Special_id = id;
                        special_bll.updIsBanner(model);
                    }
                }
                else
                {
                    continue;
                }
            }
            bindSpecial();
            String message = "成功替换首页banner!";

            MyUtil.ShowMessage(this, message);
        }
Exemplo n.º 12
0
    /// <summary>
    /// テキストデータからタイプの読み込み
    /// </summary>
    /// <returns></returns>
    private Enum ReadType(Type enumType)
    {
        // セリフのテキストデータの先頭の数字を数値に変換
        double d = 0;

        if (double.TryParse(this.text.Substring(0, 1), out d))
        {
            // 数値を調整
            d =
                Mathf.Clamp(
                    (int)d,
                    0,
                    Enum.GetNames(enumType).Length - 1
                    );

            // セリフのテキストデータから先頭の文字を削除
            this.text = this.text.Remove(0, 1);



            // 数値に対応するタイプの列挙子を返す
            return((Enum)Enum.ToObject(enumType, (int)d));
        }



        MyUtil.ErrorLog("データを正しく読み込めませんでした。");



        return(null);
    }
Exemplo n.º 13
0
    /// <summary>
    /// トリガーOFF
    ///
    /// コメントを破棄する。
    /// </summary>
    public void TriggerOff()
    {
        // まだ発生していない、又はすでに消滅しているなら処理しない
        if (!triggerFlg || isFinished)
        {
            return;
        }

        // システムメッセージでないなら処理しない
//        if ( SPEAKER_TYPE.SYSTEM != speakerType ) { return; }

        // コメントが無ければ処理しない
        if (!comment)
        {
            MyUtil.ErrorLog("null値の変数です。"); return;
        }

        // ポーズ中なら処理しない
        if (PauseScreen.IsPause())
        {
            return;
        }



        // 条件を達成したコメント(システムメッセージ)は消滅
        //
        // キャラのセリフは自動消滅。
//        if ( commentConditionsList && commentConditionsList.CheckTriggerOff(checkTriggerOffNumber) ) {
        if (Input.GetKeyDown(KeyCode.Return))
        {
            // コメントの破棄
            CommentCreator.Instance.DestroyComment(comment.name);
        }
    }
Exemplo n.º 14
0
 //添加图片
 protected void lbtnSave_Click(object sender, EventArgs e)
 {
     if (fupImage.HasFile)
     {
         string fileName = fupImage.FileName;
         string ext      = fileName.Substring(fileName.LastIndexOf('.'));
         string url      = "upload/HomeImg/" + DateTime.Now.ToString("yyyyMMddHHmmss") + GenerateSixNum() + ext;
         fupImage.SaveAs(Server.MapPath(url));
         news_model.Photo_url    = url;
         news_model.Is_photoNews = "Y";
     }
     news_model.Last_update      = Session[Constant.adminName].ToString();
     news_model.Last_update_time = DateTime.Now;
     news_model.News_id          = Convert.ToInt32(ViewState["news_id"].ToString());
     if (news_bll.updNewsImage(news_model))
     {
         //添加成功
         MyUtil.ShowMessageRedirect(this.Page, "添加成功", "youth_newslist.aspx");
     }
     else
     {
         //添加失败,清空
         MyUtil.ShowMessage(this.Page, "添加失败");
     }
 }
Exemplo n.º 15
0
    /// <summary>
    /// コントラクトエフェクト終了によるゲームオブジェクト破棄
    /// </summary>
    /// <returns></returns>
    protected bool DestroyByFinishContractEffect()
    {
        // コントラクトエフェクトが無いなら処理しない
        if (!contract)
        {
            return(MyUtil.ErrorLog("null値の変数です。"));
        }



        // コントラクトエフェクトが終了したら破棄する
        if (contract.enabled && contract.IsFinished())
        {
            CommentCreator.currentDepth = gameObject.transform.GetChild(0).GetComponent <UIWidget>().depth;
            Destroy(gameObject);



            return(true);
        }



        return(false);
    }
Exemplo n.º 16
0
 protected void BindData()
 {
     pageTotal            = (int)DbHelperSQL.GetSingle("select count(A) from (select count(classid) as A from tbGrant where " + GetWhereSql() + " group by userid,subjectid) B");
     gvwData.DataSource   = MyUtil.GetListByIndex2(pageSize, pageIndex, "userid,subjectid,tbUser.realname,tbSubject.subjectname,count(tbGrant.classid) as classcount", "tbGrant,tbUser,tbSubject", "tbGrant.userid=tbUser.id and tbGrant.subjectid=tbSubject.id", GetWhereSql(), "tbUser.realname,tbSubject.subjectname,userid,subjectid", "(userid+subjectid)", "tbUser.realname");
     gvwData.DataKeyNames = new String[] { "userid", "subjectid" };
     gvwData.DataBind();
 }
Exemplo n.º 17
0
        //反审核
        protected void lbtnReCheck_Click(object sender, EventArgs e)
        {
            int         success = 0;
            YouthTalkLg model;

            for (int i = 0; i < gvwData.Rows.Count; i++)
            {
                CheckBox cbx = (CheckBox)gvwData.Rows[i].FindControl("chkbOne");
                if (cbx.Checked == true)
                {
                    model = new YouthTalkLg();
                    int id = Convert.ToInt32(gvwData.DataKeys[i].Value);
                    model.Talk_id      = id;
                    model.Rechecker    = Session[Constant.adminName].ToString();
                    model.Recheck_time = DateTime.Today;
                    model.Is_check     = "N";
                    bll.ReCheckTalkLg(model);
                    success++;
                }
            }
            bindTalkLG();
            String message = "成功取消审核" + success + "条记录!";

            MyUtil.ShowMessage(this, message);
        }
    /// <summary>
    /// ウィジェットの設定
    /// </summary>
    public static UIWidget SetUIWidget(
        UIWidget widget,
        Color color,
        UIWidget.Pivot pivot,
        int depth,
        Vector2 dimensions
        )
    {
        if (!widget)
        {
            MyUtil.ErrorLog("null値の変数です。");
            return(null);
        }



        widget.color  = color;
        widget.pivot  = pivot;
        widget.depth  = depth;
        widget.width  = (int)dimensions.x;
        widget.height = (int)dimensions.y;



        return(widget);
    }
Exemplo n.º 19
0
        /// <summary>
        /// ライブIDからアカウント名を取得する
        /// </summary>
        /// <param name="liveId"></param>
        /// <returns></returns>
        public string GetAccountNameFromLiveId(ulong liveId)
        {
            string accountName   = "";
            string lastUpdatedAt = MyUtil.GetUnixTime(DateTime.Now).ToString() + "000";
            string apiUrl        = " https://api.whowatch.tv/lives/" + liveId
                                   + "?last_updated_at=" + lastUpdatedAt;

            string recvStr = doHttpRequest(apiUrl);

            try
            {
                // JSON形式からふわっちAPIオブジェクトに変換
                WhoWatchApiObject whoWatchApiObj = JsonConvert.DeserializeObject <WhoWatchApiObject>(recvStr);
                if (whoWatchApiObj.live != null &&
                    whoWatchApiObj.live.user != null)
                {
                    // アカウント名(Note:ふわっちAPIではuser_pathにあたる. account_nameは別物)
                    accountName = whoWatchApiObj.live.user.user_path;
                }
            }
            catch (Exception exception)
            {
                System.Diagnostics.Debug.WriteLine(exception.Message + " " + exception.StackTrace);
            }

            return(accountName);
        }
Exemplo n.º 20
0
    /// <summary>
    /// メニュースプライトの初期化
    /// </summary>
    private void InitializePauseMenuSpriteByCurrentIndex()
    {
        // ポーズ中でなければ処理しない
        if (!isPause)
        {
            return;
        }

        if (null == pauseMenuSpriteArray)
        {
            MyUtil.ErrorLog("null値の変数です。"); return;
        }



        // 非選択メニューのカラー
        float colorElement = (1.0f / 255) * 70;
        Color grayColor    = new Color(colorElement, colorElement, colorElement, 1.0f);

        // メニュースプライトのカラー設定
        for (int i = 0; i < pauseMenuSpriteArray.Length; i++)
        {
            // 現在のメニューインデックスでなければ非選択メニューのカラーに設定
            if (!currentMenuIndex.Equals(i))
            {
                pauseMenuSpriteArray[i].color = grayColor;
            }

            // 現在のメニューインデックスなら選択メニューのカラーに設定
            else
            {
                pauseMenuSpriteArray[i].color = Color.white;
            }
        }
    }
Exemplo n.º 21
0
 protected void BindData()
 {
     pageTotal            = MyUtil.GetCount("tbChapter,tbSubject", "tbChapter.subjectid=tbSubject.id", GetWhereSql());
     gvwData.DataSource   = MyUtil.GetListByIndex(pageSize, pageIndex, "tbChapter.*,tbSubject.subjectname", "tbChapter,tbSubject", "tbChapter.subjectid=tbSubject.id", GetWhereSql(), "subjectname,chapterno");
     gvwData.DataKeyNames = new String[] { "id" };
     gvwData.DataBind();
 }
Exemplo n.º 22
0
 private void BindSubject()
 {
     ddlSubject.DataSource     = MyUtil.GetMySubject();
     ddlSubject.DataTextField  = "subjectname";
     ddlSubject.DataValueField = "id";
     ddlSubject.DataBind();
 }
Exemplo n.º 23
0
    // 画面の自動回転のON, OFF
    public static void SetAutoRotation(bool isOn)
    {
        if (isOn)
        {
            // 自動回転をONとする
            Screen.orientation = ScreenOrientation.AutoRotation;
        }
        else
        {
            // 向きを固定する
            ScreenOrientation currentOrientation = MyUtil.GetScreenOrientation();
            switch (currentOrientation)
            {
            // 横向き
            case ScreenOrientation.LandscapeLeft:
                Screen.orientation = ScreenOrientation.LandscapeLeft;
                break;

            case ScreenOrientation.LandscapeRight:
                Screen.orientation = ScreenOrientation.LandscapeRight;
                break;

            // 縦向き
            case ScreenOrientation.Portrait:
                Screen.orientation = ScreenOrientation.Portrait;
                break;

            case ScreenOrientation.PortraitUpsideDown:
                Screen.orientation = ScreenOrientation.PortraitUpsideDown;
                break;
            }
        }
    }
Exemplo n.º 24
0
    /// <summary>
    /// 删除所选
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void lbtnDelete_Click(object sender, EventArgs e)
    {
        int countSuccess = 0;
        int countFail    = 0;

        for (int i = 0; i < gvwData.Rows.Count; i++)
        {
            CheckBox cbx = (CheckBox)gvwData.Rows[i].FindControl("chkbOne");
            if (cbx.Checked == true)
            {
                int  id = Convert.ToInt32(gvwData.DataKeys[i].Value);
                bool b  = DbHelperSQL.Exists("select id from tbArrange where paperid=" + id);
                if (b == false)
                {
                    //执行删除
                    paperBLL.Delete(id);
                    countSuccess++;
                }
                else
                {
                    countFail++;
                }
            }
        }
        BindData();
        String message = "成功删除" + countSuccess + "条记录!";

        if (countFail != 0)
        {
            message += "<br/>还存在" + countFail + "条记录拒绝删除!";
            message += "<br/>可能原因:试卷正在使用中!";
        }
        MyUtil.ShowMessage(this, message);
    }
Exemplo n.º 25
0
 protected void BindData()
 {
     pageTotal            = MyUtil.GetCount("tbMessage,tbUser", "tbMessage.userid=tbUser.id", GetWhereSql());
     gvwData.DataSource   = MyUtil.GetListByIndex(pageSize, pageIndex, "tbMessage.*,tbUser.realname", "tbMessage,tbUser", "tbMessage.userid=tbUser.id", GetWhereSql(), "tbMessage.id desc");
     gvwData.DataKeyNames = new String[] { "id" };
     gvwData.DataBind();
 }
Exemplo n.º 26
0
        protected void lbtnSave_Click(object sender, EventArgs e)
        {
            YouthFile model = new YouthFile();

            model.File_title       = txtTitle.Text.Trim();
            model.File_remark      = txt_content.Text.ToString();
            model.File_father_id   = Convert.ToInt32(ddl_file_col.SelectedValue);
            model.Uploader         = Session[Constant.adminName].ToString();
            model.Upload_time      = DateTime.Today;
            model.Click_times      = 0;
            model.File_source      = Convert.ToInt32(ddl_source.SelectedValue);
            model.Last_updater     = Session[Constant.adminName].ToString();
            model.Last_update_time = DateTime.Today;
            model.Is_check         = "N";
            model.Checker          = "";
            model.Check_time       = DateTime.Today;
            model.Rechecker        = "";
            model.Recheck_time     = DateTime.Today;
            AUTO.BLL.YouthFilesBLL file_dal = new AUTO.BLL.YouthFilesBLL();
            if (file_dal.AddYouthFile(model))
            {
                //添加成功
                MyUtil.ShowMessageRedirect(this.Page, "添加成功", "fileUpload.aspx");
            }
            else
            {
                //添加失败
                MyUtil.ShowMessage(this.Page, "添加失败");
            }
        }
Exemplo n.º 27
0
    // -----
    void Start()
    {
        logManager = GameObject.FindWithTag("LogManager").GetComponent <LogManager>();

        if (string.IsNullOrEmpty(PlayData.rankingName))
        {
            // ニックネームセット (仮)
            PhotonNetwork.NickName = MyUtil.GetNowAbsSeconds().ToString();
        }
        else
        {
            // ニックネームセット
            PhotonNetwork.NickName = PlayData.rankingName;
        }

        PhotonNetwork.OfflineMode = false;

#if UNITY_EDITOR
        // デバッグ用オフラインモード
        if (offlineMode)
        {
            PhotonNetwork.OfflineMode = true;
            logManager.WriteLog("-- オフラインモード --", true);
        }
        else
#endif

        {
            // PUNに接続
            PhotonConnect();
        }
    }
Exemplo n.º 28
0
        public static void Initialize(Context context)
        {
            if (!context.USUARIO.Any() && !context.PERFIL.Any() && !context.PERFIL_USUARIO.Any())
            {
                PERFIL perfil = new PERFIL
                {
                    PER_NOME = "Master"
                };

                USUARIO user = new USUARIO
                {
                    USU_NOME  = "Master",
                    USU_EMAIL = "*****@*****.**",
                    USU_SENHA = MyUtil.ComputeSha256Hash("master")
                };

                PERFIL_USUARIO perfil_usuario = new PERFIL_USUARIO
                {
                    PERFIL  = perfil,
                    USUARIO = user
                };

                context.Add(perfil_usuario);
                context.SaveChanges();
            }
        }
Exemplo n.º 29
0
 protected void lbtnSave_Click(object sender, EventArgs e)
 {
     news_model.News_title       = txtTitle.Text.Trim().ToString();
     news_model.News_content     = txt_content.Text;
     news_model.News_father_id   = Convert.ToInt32(ddlNewsCol.SelectedValue);
     news_model.Publisher        = txt_publisher.Text.ToString();
     news_model.Publisher_phone  = txt_phone.Text;
     news_model.Publisher_mail   = txt_email.Text;
     news_model.Publish_time     = DateTime.Now;
     news_model.Click_times      = 0;
     news_model.News_source      = Convert.ToInt32(ddl_source.SelectedValue.ToString());
     news_model.Last_update      = ViewState["operate_name"].ToString();
     news_model.Last_update_time = DateTime.Now;
     news_model.Is_check         = "N";
     news_model.Checker          = "";
     news_model.Check_time       = DateTime.Now;
     news_model.Rechecker        = "";
     news_model.Recheck_time     = DateTime.Now;
     news_model.Is_photoNews     = "N";
     news_model.Photo_url        = "";
     if (news_bll.AddYouthNews(news_model))
     {
         //添加成功
         MyUtil.ShowMessageRedirect(this.Page, "添加成功", "youth_newslist.aspx");
     }
     else
     {
         //添加失败,清空
         MyUtil.ShowMessage(this.Page, "添加失败");
     }
 }
        //取消初审核
        protected void lbtnReject_Click(object sender, EventArgs e)
        {
            int role_id = Convert.ToInt32(Session[Constant.roleID].ToString());

            if (role_id == 3 || role_id == 4 || role_id == 5)
            {
                String message = "对不起,您没有相应权限";
                MyUtil.ShowMessage(this.Page, message);
                return;
            }
            else
            {
                for (int i = 0; i < gvwData.Rows.Count; i++)
                {
                    CheckBox cbx = (CheckBox)gvwData.Rows[i].FindControl("chkbOne");
                    if (cbx.Checked == true)
                    {
                        int id = Convert.ToInt32(gvwData.DataKeys[i].Value);
                        news_bll.RejectNews(id, ViewState["operate_name"].ToString());
                    }
                }
                bindData();
                String message = "成功取消初审核!";
                MyUtil.ShowMessage(this, message);
            }
        }