Beispiel #1
0
    protected void btn_Sub_Click(object sender, EventArgs e)
    {
        DataEntityDataContext context = new DataEntityDataContext();
        var T = context.system_info.Where(p => p.LX == this.LX.SelectedValue);

        if (T.Count() > 0)
        {
            Response.Write("<script>alert('不能重复添加定位参!');</script>");
            //ZWL.Common.MessageBox.Show(this, "不能重复添加定位参数!");
        }
        else
        {
            system_info model = new system_info();
            model.LX     = this.LX.SelectedValue;
            model.CJJGSJ = int.Parse(this.TextBoxname.Text);
            model.WHSJ   = DateTime.Now;
            model.WHRID  = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            model.WHR    = ZWL.Common.PublicMethod.GetSessionValue("TrueName");
            context.system_info.InsertOnSubmit(model);
            context.SubmitChanges();

            ////写系统日志
            //ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
            //MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            //MyRiZhi.DoSomething = "用户添加公共信息(" + this.TextBoxname.Text + ")";
            //MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
            //MyRiZhi.Add();

            Response.Write("<script>alert('定位参数添加成功!');window.location.href='ZXWZ.aspx';</script>");
            //ZWL.Common.MessageBox.ShowAndRedirect(this, " 定位参数添加成功  !", "ZXWZ.aspx");
        }
    }
Beispiel #2
0
    protected void btn_Sub_Click(object sender, EventArgs e)
    {
        DataEntityDataContext context = new DataEntityDataContext();
        var T = context.system_info.Where(p => p.LX == this.LX.SelectedValue);
        if(T.Count() > 0) {
            Response.Write("<script>alert('不能重复添加定位参!');</script>");
            //ZWL.Common.MessageBox.Show(this, "不能重复添加定位参数!");
        }
        else {
            system_info model = new system_info();
            model.LX = this.LX.SelectedValue;
            model.CJJGSJ = int.Parse(this.TextBoxname.Text);
            model.WHSJ = DateTime.Now;
            model.WHRID = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            model.WHR = ZWL.Common.PublicMethod.GetSessionValue("TrueName");
            context.system_info.InsertOnSubmit(model);
            context.SubmitChanges();

            ////写系统日志
            //ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
            //MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            //MyRiZhi.DoSomething = "用户添加公共信息(" + this.TextBoxname.Text + ")";
            //MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
            //MyRiZhi.Add();

            Response.Write("<script>alert('定位参数添加成功!');window.location.href='ZXWZ.aspx';</script>");
            //ZWL.Common.MessageBox.ShowAndRedirect(this, " 定位参数添加成功  !", "ZXWZ.aspx");
        }
    }
Beispiel #3
0
 public Form1()
 {
     my = new myinclude();
     InitializeComponent();
     theform            = this;
     cSystem            = new system_info();
     cHdd               = new hdd_info();        //硬碟資訊
     cRunningProgram    = new running_program(); //工作管理員
     cFirewall          = new firewall_info();
     cSystemService     = new system_service();
     cSchedule          = new schedule();
     cEvents            = new events();
     cIis               = new iis();
     cInstalledSoftware = new installed_software();
     //cIni = new ini();
 }
Beispiel #4
0
    //protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
    //{
    //    string FileNameStr = ZWL.Common.PublicMethod.UploadFileIntoDir(this.FileUpload1, DateTime.Now.Ticks.ToString() + System.IO.Path.GetExtension(FileUpload1.PostedFile.FileName));
    //    if (ZWL.Common.PublicMethod.GetSessionValue("WenJianList").Trim() == "")
    //    {
    //        ZWL.Common.PublicMethod.SetSessionValue("WenJianList", FileNameStr);
    //    }
    //    else
    //    {
    //        ZWL.Common.PublicMethod.SetSessionValue("WenJianList", ZWL.Common.PublicMethod.GetSessionValue("WenJianList") + "|" + FileNameStr);
    //    }
    //    ZWL.Common.PublicMethod.BindDDL(this.CheckBoxList1, ZWL.Common.PublicMethod.GetSessionValue("WenJianList"));
    //}
    //protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
    //{
    //    try
    //    {
    //        for (int i = 0; i < this.CheckBoxList1.Items.Count; i++)
    //        {
    //            if (this.CheckBoxList1.Items[i].Selected == true)
    //            {
    //                ZWL.Common.PublicMethod.SetSessionValue("WenJianList", ZWL.Common.PublicMethod.GetSessionValue("WenJianList").Replace(this.CheckBoxList1.Items[i].Text, "").Replace("||", "|"));
    //            }
    //        }
    //        ZWL.Common.PublicMethod.BindDDL(this.CheckBoxList1, ZWL.Common.PublicMethod.GetSessionValue("WenJianList"));
    //    }
    //    catch
    //    { }
    //}

    //protected void ImageButton5_Click(object sender, ImageClickEventArgs e)
    //{
    //    try
    //    {
    //        if (this.CheckBoxList1.SelectedItem.Text.Trim().Length > 0)
    //        {
    //            Response.Write("<script>window.open('../DsoFramer/ReadFile.aspx?FilePath=" + this.CheckBoxList1.SelectedItem.Text + "');</script>");
    //        }
    //    }
    //    catch
    //    { }
    //}
    //protected void ImageButton6_Click(object sender, ImageClickEventArgs e)
    //{
    //    try
    //    {
    //        if (this.CheckBoxList1.SelectedItem.Text.Trim().Length > 0)
    //        {
    //            Response.Write("<script>window.open('../DsoFramer/EditFile.aspx?FilePath=" + this.CheckBoxList1.SelectedItem.Text + "');</script>");
    //        }
    //    }
    //    catch
    //    { }
    //}
    protected void btn_Sub_Click(object sender, EventArgs e)
    {
        DataEntityDataContext context = new DataEntityDataContext();
        system_info           model   = context.system_info.SingleOrDefault(p => p.ID == int.Parse(Request.QueryString["ID"].ToString()));

        model.LX     = this.LX.SelectedValue;
        model.CJJGSJ = int.Parse(this.TextBoxname.Text);
        context.SubmitChanges();

        ////写系统日志
        //ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        //MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        //MyRiZhi.DoSomething = "用户修改工作计划信息(" + this.TextBox1.Text + ")";
        //MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        //MyRiZhi.Add();
        Response.Write("<script>alert('定位参数修改成功!');window.location.href='ZXWZ.aspx';</script>");
        //ZWL.Common.MessageBox.ShowAndRedirect(this, "定位参数修改成功!", "ZXWZ.aspx");
    }
Beispiel #5
0
 partial void Deletesystem_info(system_info instance);
Beispiel #6
0
 partial void Updatesystem_info(system_info instance);
Beispiel #7
0
 partial void Insertsystem_info(system_info instance);