Ejemplo n.º 1
0
 protected void dgr_BaiXoa_EditCommand(object source, DataGridCommandEventArgs e)
 {
     if (e.CommandArgument.ToString().ToLower() == "edit")
     {
         int tab = 0;
         if (TabContainer1.ActiveTabIndex == 3)
         {
             tab = 3;
         }
         double _ID = Convert.ToDouble(dgr_BaiXoa.DataKeys[e.Item.ItemIndex].ToString());
         Response.Redirect("ArticleEdit.aspx?Menu_ID=" + Request["Menu_ID"].ToString() + "&ID=" + _ID.ToString() + "&Tab=" + tab);
     }
     else if (e.CommandArgument.ToString().ToLower() == "downloadalias")
     {
         int _ID = Convert.ToInt32(this.dgr_BaiXoa.DataKeys[e.Item.ItemIndex].ToString());
         ToasoanTTXVN.BaoDienTu.FilesDoc _file = new ToasoanTTXVN.BaoDienTu.FilesDoc();
         _file.LoadFileDoc(_user.UserName, _ID);
     }
 }
Ejemplo n.º 2
0
 protected void dgData_EditCommand1(object source, DataGridCommandEventArgs e)
 {
     if (e.CommandArgument.ToString().ToLower() == "edit")
     {
         int tab = 0;
         if (TabContainer1.ActiveTabIndex == 1)
         {
             tab = 1;
         }
         HPCBusinessLogic.DAL.T_NewsDAL Dal = new HPCBusinessLogic.DAL.T_NewsDAL();
         string _ID = dgr_tintuc2.DataKeys[e.Item.ItemIndex].ToString();
         Dal.IsLock(double.Parse(_ID), 1);
         Response.Redirect("ArticleEdit.aspx?Menu_ID=" + Request["Menu_ID"].ToString() + "&ID=" + _ID.ToString() + "&Tab=" + tab);
     }
     else if (e.CommandArgument.ToString().ToLower() == "downloadalias")
     {
         int _ID = Convert.ToInt32(this.dgr_tintuc2.DataKeys[e.Item.ItemIndex].ToString());
         ToasoanTTXVN.BaoDienTu.FilesDoc _file = new ToasoanTTXVN.BaoDienTu.FilesDoc();
         _file.LoadFileDoc(_user.UserName, _ID);
     }
 }