Beispiel #1
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     Tunnel.BLL.Tunnel_Profile   pf  = new Tunnel.BLL.Tunnel_Profile();
     Tunnel.Model.Tunnel_Profile pff = new Tunnel.Model.Tunnel_Profile();
     Tunnel.BLL.UserLogin        ul  = new Tunnel.BLL.UserLogin();
     if (pf.GetModelList("p_bum='" + DropDownList2.SelectedValue + "' and p_filetype='" + DropDownList3.SelectedValue + "' and p_name='" + TextBox1.Text + "' and p_year='" + DropDownList1.SelectedValue + "'").Count > 0)
     {
         Tunnel.Common.Message.Show("此文件已经存在,请重新命名!");
     }
     else
     {
         pff.p_bum      = DropDownList2.SelectedValue;
         pff.p_filetype = DropDownList3.SelectedValue;
         pff.p_name     = TextBox1.Text;
         pff.p_uid      = Convert.ToInt32(ul.LoginID);
         pff.p_year     = Convert.ToInt32(DropDownList1.SelectedValue);
         if (pf.Add(pff) > 0)
         {
             Tunnel.Common.Message.Show("提交成功!");
             string strsql = "";
             strsql = "insert into tunnel_log(l_user,l_time,l_content,l_ip,l_sort) values(" + ul.LoginID + ",'" + DateTime.Now + "','公司事务>>档案管理>>新增档案。标题:" + pff.p_name + "','" + Tunnel.Common.Common.GetIp() + "',1)";
             Tunnel.Data.DbHelperSQL.ExecuteSql(strsql);
         }
     }
 }
Beispiel #2
0
    /// <summary>
    /// 删除记录
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void LinkButton1_Command(object sender, CommandEventArgs e)
    {
        string a = e.CommandName.ToString();

        Tunnel.BLL.Tunnel_Profile pf = new Tunnel.BLL.Tunnel_Profile();
        pf.Delete(IsNum(a));
        Tunnel.Common.Message.Show("删除成功!");
    }
Beispiel #3
0
    /// <summary>
    /// 删除记录
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void LinkButton1_Command(object sender, CommandEventArgs e)
    {
        string a = e.CommandName.ToString();

        Tunnel.BLL.Tunnel_Profile   pf    = new Tunnel.BLL.Tunnel_Profile();
        Tunnel.Model.Tunnel_Profile model = pf.GetModel(IsNum(a));
        pf.Delete(IsNum(a));
        string strsql = "";

        strsql = "insert into tunnel_log(l_user,l_time,l_content,l_ip,l_sort) values(" + ul.LoginID + ",'" + DateTime.Now + "','公司事务>>档案管理>>删除档案信息。标题:" + model.p_name + "','" + Tunnel.Common.Common.GetIp() + "',2)";
        Tunnel.Data.DbHelperSQL.ExecuteSql(strsql);
        Tunnel.Common.Message.Show("删除成功!");
    }
Beispiel #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string a = "0";

        if (!IsPostBack)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["id"]))
            {
                a = Request.QueryString["id"].ToString();
            }
            Tunnel.BLL.Tunnel_Profile   pf  = new Tunnel.BLL.Tunnel_Profile();
            Tunnel.Model.Tunnel_Profile pff = new Tunnel.Model.Tunnel_Profile();
            pff = pf.GetModel(IsNum(a));
            if (pff != null)
            {
                Label1.Text = pff.p_name;
                Label2.Text = pff.p_year.ToString();
                Label3.Text = pff.p_bum;
                Label4.Text = pff.p_filetype;
            }
        }
    }