Ejemplo n.º 1
0
    protected void btnSure_Click(object sender, EventArgs e)
    {
        ProductObject dep = new ProductObject();

        WebFormHelper.GetDataFromForm(this, dep);
        if (dep.Id < 0)
        {
            dep.Content = System.Web.HttpContext.Current.Server.HtmlEncode(dep.Content);
            if (SimpleOrmOperator.Create(dep))
            {
                WebTools.Alert("添加成功!");
            }
            else
            {
                WebTools.Alert("添加失败!");
            }
        }
        else
        {
            if (SimpleOrmOperator.Update(dep))
            {
                WebTools.Alert("修改成功!");
            }
            else
            {
                WebTools.Alert("修改失败!");
            }
        }
    }
Ejemplo n.º 2
0
    protected void btnSure_Click(object sender, EventArgs e)
    {
        UserObject dep = new UserObject();

        WebFormHelper.GetDataFromForm(this, dep);
        dep.BeginIp = this.txtBeginIp1.Text.Trim() + "." + this.txtBeginIp2.Text.Trim() + "." + this.txtBeginIp3.Text.Trim() + "." + this.txtBeginIp4.Text.Trim();
        dep.EndIp   = this.txtEndIp1.Text.Trim() + "." + this.txtEndIp2.Text.Trim() + "." + this.txtEndIp3.Text.Trim() + "." + this.txtEndIp4.Text.Trim();
        if (dep.Id < 0)
        {
            dep.Password = SecurityFactory.GetSecurity().Encrypt(ConfigurationManager.AppSettings["DefaultPassword"].ToString());

            if (SimpleOrmOperator.Create(dep))
            {
                WebTools.Alert("添加成功!");
            }
            else
            {
                WebTools.Alert("添加失败!");
            }
        }
        else
        {
            if (SimpleOrmOperator.Update(dep))
            {
                WebTools.Alert("修改成功!");
            }
            else
            {
                WebTools.Alert("修改失败!");
            }
        }
    }
Ejemplo n.º 3
0
    protected void btnSure_Click(object sender, EventArgs e)
    {
        SchoolCarInfo entity = new SchoolCarInfo();

        WebFormHelper.GetDataFromForm(this, entity);
        entity.DepName = this.cbDepCodeValue.SelectedItem.Text;
        if (entity.Id < 0)
        {
            if (SimpleOrmOperator.Create(entity))
            {
                WebTools.Alert("添加成功!");
            }
            else
            {
                WebTools.Alert("添加失败!");
            }
        }
        else
        {
            if (SimpleOrmOperator.Update(entity))
            {
                WebTools.Alert("修改成功!");
            }
            else
            {
                WebTools.Alert("修改失败!");
            }
        }
    }
Ejemplo n.º 4
0
    protected void btnSure_Click(object sender, EventArgs e)
    {
        TerminalEntity entity = new TerminalEntity();

        WebFormHelper.GetDataFromForm(this, entity);
        // entity.MachineMac = FT.Commons.Web.Tools.WebToolsHelper.GetMac(entity.MachineIp);
        //entity.StartDate = Convert.ToDateTime(this.txtBeginDate.Value.ToString());
        // entity.EndDate = Convert.ToDateTime(this.txtEndDate.Value.ToString());
        if (entity.Id < 0)
        {
            if (SimpleOrmOperator.Create(entity))
            {
                TerminalOnlineMonitorThread.InitTerminalList();
                WebTools.Alert(this, "添加成功!");
            }
            else
            {
                WebTools.Alert("添加失败!");
            }
        }
        else
        {
            if (SimpleOrmOperator.Update(entity))
            {
                TerminalOnlineMonitorThread.InitTerminalList();
                WebTools.Alert(this, "修改成功!");
            }
            else
            {
                WebTools.Alert("修改失败!");
            }
        }
    }
Ejemplo n.º 5
0
    protected void btnSure_Click(object sender, EventArgs e)
    {
        ProductSendInfo entity = new ProductSendInfo();

        WebFormHelper.GetDataFromForm(this, entity);
        entity.StartDate = Convert.ToDateTime(this.txtBeginDate.Value.ToString());
        entity.EndDate   = Convert.ToDateTime(this.txtEndDate.Value.ToString());
        if (entity.Id < 0)
        {
            if (SimpleOrmOperator.Create(entity))
            {
                WebTools.Alert(this, "添加成功!");
            }
            else
            {
                WebTools.Alert("添加失败!");
            }
        }
        else
        {
            if (SimpleOrmOperator.Update(entity))
            {
                WebTools.Alert(this, "修改成功!");
            }
            else
            {
                WebTools.Alert("修改失败!");
            }
        }
    }
Ejemplo n.º 6
0
    protected void btnSure_Click(object sender, EventArgs e)
    {
        DepartMent dep = new DepartMent();

        WebFormHelper.GetDataFromForm(this, dep);
        if (dep.Id < 0)
        {
            if (SimpleOrmOperator.Create(dep))
            {
                WebTools.Alert("添加成功!");
            }
            else
            {
                WebTools.Alert("添加失败!");
            }
        }
        else
        {
            if (SimpleOrmOperator.Update(dep))
            {
                WebTools.Alert("修改成功!");
            }
            else
            {
                WebTools.Alert("修改失败!");
            }
        }
    }
Ejemplo n.º 7
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        SystemConfigEntity entity = new SystemConfigEntity();

        entity.Id = 1;
        WebFormHelper.GetDataFromForm(this, entity);
        if (entity.Id < 0)
        {
            if (SimpleOrmOperator.Create(entity))
            {
                this.lbMsg.Text = "(保存系统配置成功!)";
            }
            else
            {
                this.lbMsg.Text = "(保存系统配置失败!)";
            }
        }
        else
        {
            if (SimpleOrmOperator.Update(entity))
            {
                this.lbMsg.Text = "(保存系统配置成功!)";
            }
            else
            {
                this.lbMsg.Text = "(保存系统配置失败!)";
            }
        }
    }
Ejemplo n.º 8
0
    protected void btnSure_Click(object sender, EventArgs e)
    {
        RoleObject dep = new RoleObject();

        WebFormHelper.GetDataFromForm(this, dep);
        dep.RoleString = this.GetRightString();
        if (dep.Id < 0)
        {
            if (SimpleOrmOperator.Create(dep))
            {
                WebTools.Alert("添加成功!");
            }
            else
            {
                WebTools.Alert("添加失败!");
            }
        }
        else
        {
            if (SimpleOrmOperator.Update(dep))
            {
                WebTools.Alert("修改成功!");
            }
            else
            {
                WebTools.Alert("修改失败!");
            }
        }
        WebTools.CloseSelf(this);
    }
Ejemplo n.º 9
0
    protected void btnSure_Click(object sender, EventArgs e)
    {
        TerminalGroup entity = new TerminalGroup();

        WebFormHelper.GetDataFromForm(this, entity);
        if (entity.Id < 0)
        {
            if (SimpleOrmOperator.Create(entity))
            {
                WebTools.Alert(this, "添加成功!");
            }
            else
            {
                WebTools.Alert("添加失败!");
            }
        }
        else
        {
            if (SimpleOrmOperator.Update(entity))
            {
                WebTools.Alert(this, "修改成功!");
            }
            else
            {
                WebTools.Alert("修改失败!");
            }
        }
    }
Ejemplo n.º 10
0
    protected void btnSure_Click(object sender, EventArgs e)
    {
        if (this.cbCityCodeValue.SelectedIndex == 0)
        {
            return;
        }
        TrafficLimitInfoEntity entity = new TrafficLimitInfoEntity();

        WebFormHelper.GetDataFromForm(this, entity);
        // entity.MachineMac = FT.Commons.Web.Tools.WebToolsHelper.GetMac(entity.MachineIp);
        //entity.StartDate = Convert.ToDateTime(this.txtBeginDate.Value.ToString());
        // entity.EndDate = Convert.ToDateTime(this.txtEndDate.Value.ToString());
        if (entity.Id < 0)
        {
            if (SimpleOrmOperator.Create(entity))
            {
                WebTools.Alert(this, "添加成功!");
            }
            else
            {
                WebTools.Alert("添加失败!");
            }
        }
        else
        {
            if (SimpleOrmOperator.Update(entity))
            {
                WebTools.Alert(this, "修改成功!");
            }
            else
            {
                WebTools.Alert("修改失败!");
            }
        }
    }
Ejemplo n.º 11
0
    protected void btnSure_Click(object sender, EventArgs e)
    {
        SystemWholeXmlConfig entity = new SystemWholeXmlConfig();

        WebFormHelper.GetDataFromForm(this, entity);
        entity.Valid = this.rblState.SelectedIndex;
        SystemWholeXmlConfigManager.SaveConfig(entity);
        WebTools.Alert(this, "配置系统参数成功!");
    }
Ejemplo n.º 12
0
    protected void btnSure_Click(object sender, EventArgs e)
    {
        // string tt = this.txtDepNickName.Text;
        // string tttt2 = this.txtDepFullName.Text.Trim();
        DepartmentInfo dep = new DepartmentInfo();

        WebFormHelper.GetDataFromForm(this, dep);
        DepartmentInfoOperator.CreateOrUpdate(dep);
    }
Ejemplo n.º 13
0
    protected void btnSure_Click(object sender, EventArgs e)
    {
        UserInfo model = new UserInfo();

        WebFormHelper.GetDataFromForm(this, model);
        model.BeginIp = this.txtBeginIp1.Text.Trim() + "." + this.txtBeginIp2.Text.Trim() + "." + this.txtBeginIp3.Text.Trim() + "." + this.txtBeginIp4.Text.Trim();
        model.EndIp   = this.txtEndIp1.Text.Trim() + "." + this.txtEndIp2.Text.Trim() + "." + this.txtEndIp3.Text.Trim() + "." + this.txtEndIp4.Text.Trim();
        UserInfoOperator.CreateOrUpdate(model);
    }
Ejemplo n.º 14
0
    protected void btnSure_Click(object sender, EventArgs e)
    {
        RoleInfo model = new RoleInfo();

        WebFormHelper.GetDataFromForm(this, model);
        model.MenuStr = this.GetMenuString();
        RoleInfoOperator.CreateOrUpdate(model);
        WebTools.CloseSelf(this);
    }
Ejemplo n.º 15
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        TestUser user = new TestUser();

        WebFormHelper.GetDataFromForm(this, user);
        FT.DAL.Orm.SimpleOrmOperator.Create(user);
        WebTools.Alert("添加成功!");
        WebTools.CloseSelf(this);
    }
Ejemplo n.º 16
0
    protected void btnSure_Click(object sender, EventArgs e)
    {
        int        depId = this.Operator.DeptId;
        DepartMent dep   = SimpleOrmOperator.Query <DepartMent>(depId);

        DrvAuthObject auth = SimpleOrmOperator.Query <DrvAuthObject>(dep.DepCode);

        if (auth == null || auth.YLR_IND != 1)
        {
            WebTools.Alert("未获得授权不能使用预录入功能!");
            return;
        }

        StudentApplyInfo entity = new StudentApplyInfo();

        WebFormHelper.GetDataFromForm(this, entity);
        entity.Csrq = this.txtCsrq.Value.Trim();
        entity.Tjrq = this.txtTjrq.Value.Trim();
        //借用一下这个字段
        entity.PhotoSrc = this.cbBustype.SelectedValue;

        if (!string.IsNullOrEmpty(Request.Params["cbDjzsxzqhValue"]))
        {
            entity.Djzsxzqh = Request.Params["cbDjzsxzqhValue"];
        }


        entity.CheckDate = DateTime.Now.ToString("yyyy-MM-dd");
        // entity.DepName = this.cbDepCodeValue.SelectedItem.Text;
        if (entity.Id < 0)
        {
            entity.Jxdm = this.Operator.Desp3;
            entity.Jxmc = this.Operator.Desp4;
            if (SimpleOrmOperator.Create(entity))
            {
                WebTools.Alert("添加成功!");
            }
            else
            {
                WebTools.Alert("添加失败!");
            }
        }
        else
        {
            if (SimpleOrmOperator.Update(entity))
            {
                WebTools.Alert("修改成功!");
            }
            else
            {
                WebTools.Alert("修改失败!");
            }
        }
    }
Ejemplo n.º 17
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        PersonInfoChange entity = new PersonInfoChange();

        WebFormHelper.GetDataFromForm(this, entity);
        if (SimpleOrmOperator.Create(entity))
        {
            WebTools.Alert("提交驾驶人联系方式变更备案成功!");
        }
        else
        {
            WebTools.Alert("提交驾驶人联系方式变更备案失败!");
        }
    }
Ejemplo n.º 18
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        CarOwnerInfoChange entity = new CarOwnerInfoChange();

        WebFormHelper.GetDataFromForm(this, entity);
        entity.Hmhp = this.txtHmhpPrefix.Text + this.txtHmhpEnd.Text.Trim();
        if (SimpleOrmOperator.Create(entity))
        {
            WebTools.Alert("提交车主联系方式变更备案成功!");
        }
        else
        {
            WebTools.Alert("提交车主联系方式变更备案失败!");
        }
    }
Ejemplo n.º 19
0
    protected void btnSure_Click(object sender, EventArgs e)
    {
        ProductInfo entity = new ProductInfo();

        WebFormHelper.GetDataFromForm(this, entity);
        // entity.MachineMac = FT.Commons.Web.Tools.WebToolsHelper.GetMac(entity.MachineIp);
        //entity.StartDate = Convert.ToDateTime(this.txtBeginDate.Value.ToString());
        // entity.EndDate = Convert.ToDateTime(this.txtEndDate.Value.ToString());
        entity.Imgs       = ViewState["imgstr"].ToString();
        entity.ImgMain    = ViewState["imgmain"].ToString();
        entity.Production = System.Web.HttpUtility.HtmlEncode(this.CKEditorControl1.Text);

        //Server.HtmlEncode(this.i_content.Text);
        if (entity.Id < 0)
        {
            if (SimpleOrmOperator.Create(entity))
            {
                WebTools.Alert(this, "添加成功!");
            }
            else
            {
                WebTools.Alert("添加失败!");
            }
        }
        else
        {
            if (SimpleOrmOperator.Update(entity))
            {
                WebTools.Alert(this, "修改成功!");
            }
            else
            {
                WebTools.Alert("修改失败!");
            }
        }
    }