Esempio n. 1
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);
    }
Esempio n. 2
0
 public static void CreateOrUpdate(RoleInfo model)
 {
     if (model.Id < 0)
     {
         if (SimpleOrmOperator.Create(model))
         {
             LogInfoOperator.LogSystem("添加角色", "添加角色" + model.RoleName);
             WebTools.Alert("添加成功!");
         }
         else
         {
             WebTools.Alert("添加失败!");
         }
     }
     else
     {
         if (SimpleOrmOperator.Update(model))
         {
             LogInfoOperator.LogSystem("修改角色", "修改角色" + model.RoleName);
             WebTools.Alert("修改成功!");
         }
         else
         {
             WebTools.Alert("修改失败!");
         }
     }
 }
Esempio n. 3
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("修改失败!");
            }
        }
    }
Esempio n. 4
0
        public static void CreateOrUpdate(UserInfo model)
        {
            if (model.Id < 0)
            {
                model.Password = SecurityFactory.GetSecurity().Encrypt(ConfigurationManager.AppSettings["DefaultPassword"].ToString());

                if (SimpleOrmOperator.Create(model))
                {
                    WebTools.Alert("添加成功!");
                }
                else
                {
                    WebTools.Alert("添加失败!");
                }
            }
            else
            {
                if (SimpleOrmOperator.Update(model))
                {
                    WebTools.Alert("修改成功!");
                }
                else
                {
                    WebTools.Alert("修改失败!");
                }
            }
        }
Esempio n. 5
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 = "(保存系统配置失败!)";
            }
        }
    }
Esempio 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("修改失败!");
            }
        }
    }
Esempio n. 7
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("修改失败!");
            }
        }
    }
Esempio n. 8
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("修改失败!");
            }
        }
    }
Esempio 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("修改失败!");
            }
        }
    }
Esempio n. 10
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("修改失败!");
            }
        }
    }
Esempio n. 11
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (this.lbIdCard.Text.Trim().Length > 0)
        {
            BusAllInfo info  = null;
            ArrayList  infos = SimpleOrmOperator.QueryConditionList <BusAllInfo>(" where c_idcard='" + this.lbIdCard.Text + "' and i_state=0");
            if (infos.Count != 0)
            {
                info             = infos[0] as BusAllInfo;
                info.RegAreaCode = this.cbRegArea.SelectedValue.ToString();
                info.RegArea     = this.txtRegArea.Text.Trim();
                info.PostCode    = this.txtPostCode.Text.Trim();
                info.Phone       = this.txtPhone.Text.Trim();
                info.Height      = this.txtHeight.Text.Trim();
                info.Zsl         = this.txtZsl.Text.Trim();
                info.Ysl         = this.txtYsl.Text.Trim();
                info.Bsl         = this.cbBsl.Text;
                info.Tl          = this.cbTl.Text;
                info.Sz          = this.cbSz.Text;
                info.Zxz         = this.cbZxz.Text;
                info.Yxz         = this.cbYxz.Text;
                info.Qgjb        = this.cbQgjb.Text;
                info.CheckDate   = this.txtCheckDate.Value;
                info.Hospital    = this.txtHospital.Text;

                SimpleOrmOperator.Update(info);
                this.LogBus("进行体检信息录入", "进行" + this.lbIdCard.Text.Trim() + "的体检信息录入!");
                this.btnPrintReturn.Enabled = true;
                this.btnQuitBus.Enabled     = false;
                //this.btnPrintReturn.Enabled = true;
            }
        }
    }
Esempio n. 12
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("修改失败!");
            }
        }
    }
Esempio n. 13
0
 public static void CreateOrUpdate(DepartmentInfo dep)
 {
     if (dep.Id < 0)
     {
         if (SimpleOrmOperator.Create(dep))
         {
             LogInfoOperator.LogSystem("添加车管所部门", "添加车管所部门" + dep.DepFullName);
             WebTools.Alert("添加成功!");
         }
         else
         {
             WebTools.Alert("添加失败!");
         }
     }
     else
     {
         if (SimpleOrmOperator.Update(dep))
         {
             LogInfoOperator.LogSystem("修改车管所部门", "修改车管所部门" + dep.DepFullName);
             WebTools.Alert("修改成功!");
         }
         else
         {
             WebTools.Alert("修改失败!");
         }
     }
 }
Esempio n. 14
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        FpStudentObject pFso = ViewState[typeof(FpStudentObject).Name] as FpStudentObject;

        Random random = new Random();

        pFso.LESSON_ENTER_1 = DateTimeHelper.fnParseDateTime(this.lbStuLessonEnter1.Value, default(DateTime));
        pFso.LESSON_LEAVE_1 = DateTimeHelper.fnParseDateTime(this.lbStuLessonLeave1.Value, default(DateTime));


        pFso.LESSON_ENTER_2 = DateTimeHelper.fnParseDateTime(this.lbStuLessonEnter2.Value, default(DateTime));
        pFso.LESSON_LEAVE_2 = DateTimeHelper.fnParseDateTime(this.lbStuLessonLeave2.Value, default(DateTime));

        pFso.TRAIN_ENTER_1 = DateTimeHelper.fnParseDateTime(this.lbStuTrainEnter1.Value, default(DateTime));
        pFso.TRAIN_LEAVE_1 = DateTimeHelper.fnParseDateTime(this.lbStuTrainLeave1.Value, default(DateTime));

        pFso.TRAIN_ENTER_2 = DateTimeHelper.fnParseDateTime(this.lbStuTrainEnter2.Value, default(DateTime));
        pFso.TRAIN_LEAVE_2 = DateTimeHelper.fnParseDateTime(this.lbStuTrainLeave2.Value, default(DateTime));

        pFso.TRAIN_ENTER_3 = DateTimeHelper.fnParseDateTime(this.lbStuTrainEnter3.Value, default(DateTime));
        pFso.TRAIN_LEAVE_3 = DateTimeHelper.fnParseDateTime(this.lbStuTrainLeave3.Value, default(DateTime));

        pFso.TRAIN_ENTER_4 = DateTimeHelper.fnParseDateTime(this.lbStuTrainEnter4.Value, default(DateTime));
        pFso.TRAIN_LEAVE_4 = DateTimeHelper.fnParseDateTime(this.lbStuTrainLeave4.Value, default(DateTime));

        pFso.TRAIN_ENTER_5 = DateTimeHelper.fnParseDateTime(this.lbStuTrainEnter5.Value, default(DateTime));
        pFso.TRAIN_LEAVE_5 = DateTimeHelper.fnParseDateTime(this.lbStuTrainLeave5.Value, default(DateTime));

        pFso.TRAIN_ENTER_6 = DateTimeHelper.fnParseDateTime(this.lbStuTrainEnter6.Value, default(DateTime));
        pFso.TRAIN_LEAVE_6 = DateTimeHelper.fnParseDateTime(this.lbStuTrainLeave6.Value, default(DateTime));

        pFso.TRAIN_ENTER_7 = DateTimeHelper.fnParseDateTime(this.lbStuTrainEnter7.Value, default(DateTime));
        pFso.TRAIN_LEAVE_7 = DateTimeHelper.fnParseDateTime(this.lbStuTrainLeave7.Value, default(DateTime));

        pFso.TRAIN_ENTER_8 = DateTimeHelper.fnParseDateTime(this.lbStuTrainEnter8.Value, default(DateTime));
        pFso.TRAIN_LEAVE_8 = DateTimeHelper.fnParseDateTime(this.lbStuTrainLeave8.Value, default(DateTime));


        pFso.KM1_ENTER = DateTimeHelper.fnParseDateTime(this.lbStuKm1Enter.Value, default(DateTime));

        pFso.KM2_ENTER = DateTimeHelper.fnParseDateTime(this.lbStuKm2Enter.Value, default(DateTime));

        pFso.KM3_ENTER = DateTimeHelper.fnParseDateTime(this.lbStuKm3Enter.Value, default(DateTime));

        pFso.KM2_3IN9_ENTER = DateTimeHelper.fnParseDateTime(this.lbKM23IN9ENTER.Value, default(DateTime));


        pFso.TRAIN_END_DATE = DateTimeHelper.fnParseDateTime(this.lbStuTrainEndDate.Value, default(DateTime));

        pFso.STATUE = Convert.ToInt32(ddlStatue.SelectedValue);

        if (SimpleOrmOperator.Update(pFso))
        {
            WebTools.Alert("学员信息保存成功");
        }
        else
        {
            return;
        }
    }
Esempio n. 15
0
    protected void btnCommit_Click(object sender, EventArgs e)
    {
        FpLocalType localtype = new FpLocalType();

        localtype.ID             = StringHelper.fnFormatNullOrBlankInt(this.lbId.Text, -1);
        localtype.NAME           = txtLocalTypeName.Text;
        localtype.DESCP          = txtLocalTypeDescp.Text;
        localtype.TRAIN_TIMES    = StringHelper.fnFormatNullOrBlankInt(txtTrainTimes.Text, 8);
        localtype.KM3_VERIFY_IND = cbKm3VerifyInd.Checked ? "Y" : "N";
        localtype.KM1_IND        = cbKm1Ind.Checked ? "Y" : "N";
        localtype.KM2_3IN9_IND   = cbKm2_3in9Ind.Checked ? "Y" : "N";
        localtype.KM2_IND        = cbKm2Ind.Checked ? "Y" : "N";
        localtype.KM3_IND        = cbKm3Ind.Checked ? "Y" : "N";
        localtype.LESSON_IND     = cbLessonInd.Checked ? "Y" : "N";
        if (SimpleOrmOperator.Update(localtype))
        {
            WebTools.Alert("修改成功!");
        }
        else if (SimpleOrmOperator.Create(localtype))
        {
            WebTools.Alert("添加成功!");
        }
        else
        {
            WebTools.Alert("保存失败!");
        }
        FPSystemBiz.DictFpLocalTypes.Clear();
    }
Esempio n. 16
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        DateTime   date  = Convert.ToDateTime(this.txtDate.Value);
        DateTime   begin = DateTimeHelper.GetMonday(date);
        WeekRecord week  = WeekRecordOperator.GetByWeekNum(DateTimeHelper.GetWeekOfYear(date), begin.ToShortDateString());

        if (week.Id <= 0)
        {
            WebTools.Alert("没有" + this.txtDate.Value + "本期的排班!");
            return;
        }
        if (week.Id > 0 && week.Checked == 0)
        {
            week.Checked       = 1;
            week.CheckOperator = this.Operator.OperatorName;
            SimpleOrmOperator.Update(week);
            //WeekRecordOperator.Update(week);
            WebTools.Alert("审核通过!");
        }

        else
        {
            WebTools.Alert("已审核的记录无法审核!");
        }
    }
Esempio n. 17
0
    public static bool CheckPhoto(StudentApplyInfo info)
    {
        bool result = false;
        StudentApplyInfoChecked checkInfo = SimpleOrmOperator.Query <StudentApplyInfoChecked>(info.Id);

        try
        {
            MemoryStream ms = new MemoryStream(GetPhoto(info.Sfzmhm));

            Image image = Image.FromStream(ms, true);

            // result = DriverInterface.WritePersonPhoto(info.Sfzmmc, info.Sfzmhm, image);
            string   zp  = ImageHelper.ImageToBase64Str(image);
            string[] res = DrvNewInterface.WritePhoto(info.Sfzmhm, zp);

            if (res.Length == 2)
            {
                checkInfo.PhotoSyn = 1;
                result             = true;
            }
            else if (res.Length == 3)
            {
                checkInfo.PhotoSyn    = 2;
                checkInfo.CheckResult = res[2];
            }
        }
        catch (System.Exception e)
        {
            result        = false;
            info.PhotoSyn = 2;
        }
        SimpleOrmOperator.Update(checkInfo);

        return(result);
    }
Esempio n. 18
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("修改失败!");
            }
        }
    }
Esempio n. 19
0
    public static bool Check(int id, string optname)
    {
        bool                    isChecked = false;
        StudentApplyInfo        info      = SimpleOrmOperator.Query <StudentApplyInfo>(id);
        StudentApplyInfoChecked infoCheck = SimpleOrmOperator.Query <StudentApplyInfoChecked>(id);
        string                  glbm      = System.Configuration.ConfigurationManager.AppSettings["DrvHelperSystem_glbm"];
        TmriResponse            resp      = null;

        string[] res = new string[] {};
        try
        {
            string useold = System.Configuration.ConfigurationManager.AppSettings["Drv_Apply_Use_Old"];
            if (useold == "true")
            {
                resp = new TmriResponse();
                bool resultold = DriverInterface.WriteApplyOld(ConvertInfoToRequest(info));
                // resultold ? 0 : 2;
                if (resultold)
                {
                    resp.Code    = 0;
                    resp.Message = "更新成功";
                }
                else
                {
                    resp.Code    = 2;
                    resp.Message = "更新不成功";
                }
            }
            // resp = DriverInterface.WriteDrvBaseTmriRequest(ConvertInfoToRequest(info));
            //resp= DriverInterface.yuyueInfo(info);
            info.Hmcd = "1";

            string xml = ConvertInfoToRequest(info).ToXml();
            res = DrvNewInterface.WritePresign(xml);
        }
        catch (Exception exe)
        {
            SaveInfoCheckFail(info, optname, exe.Message);
            //info.CheckResult = exe.Message;
            // SimpleOrmOperator.Update(info);
            return(false);
        }
        if (res.Length == 2)
        //if (resp.Code == 0 || resp.Code == 1)
        {
            infoCheck.Checked     = 1;
            infoCheck.CheckResult = res[1];
            isChecked             = true;
            //DataAccessFactory.GetDataAccess().ExecuteSql("update table_student_apply_info set i_tpchecked_num=i_tpchecked_num+1 where i_tpchecked_num<i_tpused_num and id=" + info.PaibanId);
        }
        else if (res.Length == 3)
        {
            infoCheck.Checked     = 2;
            infoCheck.CheckResult = res[1];
        }
        infoCheck.CheckOperator = optname;
        SimpleOrmOperator.Update(infoCheck);
        return(isChecked);
    }
Esempio n. 20
0
 public static void SaveInfoCheckFail(StudentApplyInfo info, string name, string msg)
 {
     info.Checked       = 2;
     info.CheckOperator = name;
     // info.Jbr = name;
     info.CheckResult = msg;
     SimpleOrmOperator.Update(info);
     // DataAccessFactory.GetDataAccess().ExecuteSql("update table_student_apply_info set c_check_result='"+msg+"'  and id=" + info.Id);
 }
Esempio n. 21
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("修改失败!");
            }
        }
    }
Esempio n. 22
0
 public static void SaveInfoCheckFail(YuyueInfo info, string name, string msg)
 {
     info.Checked       = 2;
     info.CheckOperator = name;
     info.Jbr           = name;
     info.CheckResult   = msg;
     SimpleOrmOperator.Update(info);
     if (!DataAccessFactory.GetDataAccess().ExecuteSql("update table_yuyue_limit set i_tpused_num=i_tpused_num-1 where i_tpused_num>0  and id=" + info.PaibanId))
     {
         DataAccessFactory.GetDataAccess().ExecuteSql("update table_yuyue_limit set i_used_num=i_used_num-1 where i_used_num>0 and id=" + info.PaibanId);
     }
 }
Esempio n. 23
0
    protected void dgLists_ItemCommand(object source, DataGridCommandEventArgs e)
    {
        if (e.CommandName == "Delete")
        {
            // Response.Write(e.CommandArgument);
            int id = Convert.ToInt32(e.CommandArgument);
            FT.DAL.DataAccessFactory.GetDataAccess().ExecuteSql("delete from yuantuo_product_info where id=" + id);
            WebTools.Alert(this, "删除成功!");
            this.ProcedurePager1.Changed = true;
        }
        else if (e.CommandName == "Detail")
        {
            // Response.Write(e.CommandArgument);
            int id = Convert.ToInt32(e.CommandArgument);
            this.Pop(id);
        }
        else if (e.CommandName == "Up")
        {
            int         id     = Convert.ToInt32(e.CommandArgument);
            ProductInfo entity = SimpleOrmOperator.Query <ProductInfo>(id);
            if (entity.Status == 0)
            {
                entity.Status = 1;
                SimpleOrmOperator.Update(entity);
                e.Item.Cells[8].Text      = "上架中";
                e.Item.Cells[8].ForeColor = Color.Black;
                WebTools.Alert(this, "已将产品" + entity.Name + "上架!!!");
            }
            else
            {
                WebTools.Alert(this, "产品" + entity.Name + "正处于上架中!!!");
            }
        }
        else if (e.CommandName == "Down")
        {
            int         id     = Convert.ToInt32(e.CommandArgument);
            ProductInfo entity = SimpleOrmOperator.Query <ProductInfo>(id);
            if (entity.Status == 1)
            {
                entity.Status = 0;
                SimpleOrmOperator.Update(entity);
                e.Item.Cells[8].Text      = "已下架";
                e.Item.Cells[8].ForeColor = Color.Red;
                WebTools.Alert(this, "已将产品" + entity.Name + "下架!!!");
            }
            else
            {
                WebTools.Alert(this, "产品" + entity.Name + "正处于下架状态!!!");
            }

            // FT.Commons.Tools.WindowExHelper.WakeUp(entity.MachineMac);
        }
    }
Esempio n. 24
0
    public static void Update(WeekRecord week, ArrayList limits)
    {
        SimpleOrmOperator.Update(week);
        string   datestr   = week.WeekRange.Substring(0, week.WeekRange.IndexOf('至'));
        DateTime begin     = DateTimeHelper.GetMonday(DateTime.Parse(datestr));
        string   deleteSql = "delete from table_yuyue_limit where i_week_num=" + week.WeekNum + " and date_ksrq like '" + begin.Year.ToString() + "%'";

        DataAccessFactory.GetDataAccess().ExecuteSql(deleteSql);

        foreach (object obj in limits)
        {
            YuyueLimit limit = obj as YuyueLimit;
            YuyueLimitOperator.Save(week, limit, begin);
        }
    }
Esempio n. 25
0
    protected void btnEdit_Click(object sender, EventArgs e)
    {
        FPConfig config = FPSystemBiz.GetCurrConfig();

        config.FP_LESSON_INTERVAL       = StringHelper.fnFormatNullOrBlankInt(tbFp_lesson_interval.Text, 1);
        config.FP_TRAIN_INTERVAL        = StringHelper.fnFormatNullOrBlankInt(tbFp_train_interval.Text, 1);
        config.FP_LESSON_ENTER_1_HH     = ddlLessonEnter1HH.SelectedIndex;
        config.FP_LESSON_ENTER_1_MM     = ddlLessonEnter1MM.SelectedIndex;
        config.FP_LESSON_ENTER_2_HH     = ddlLessonEnter2HH.SelectedIndex;
        config.FP_LESSON_ENTER_2_MM     = ddlLessonEnter2MM.SelectedIndex;
        config.FP_LESSON_ENTER_3_HH     = ddlLessonEnter3HH.SelectedIndex;
        config.FP_LESSON_ENTER_3_MM     = ddlLessonEnter3MM.SelectedIndex;
        config.FP_LESSON_ENTER_4_HH     = ddlLessonEnter4HH.SelectedIndex;
        config.FP_LESSON_ENTER_4_MM     = ddlLessonEnter4MM.SelectedIndex;
        config.FP_TRAIN_1_ENTER_FROM_HH = ddlTrain1EnterFromHH.SelectedIndex;
        config.FP_TRAIN_1_ENTER_FROM_MM = ddlTrain1EnterFromMM.SelectedIndex;
        config.FP_TRAIN_1_ENTER_TO_HH   = ddlTrain1EnterToHH.SelectedIndex;
        config.FP_TRAIN_1_ENTER_TO_MM   = ddlTrain1EnterToMM.SelectedIndex;

        config.FP_TRAIN_2_ENTER_FROM_HH = ddlTrain2EnterFromHH.SelectedIndex;
        config.FP_TRAIN_2_ENTER_FROM_MM = ddlTrain2EnterFromMM.SelectedIndex;
        config.FP_TRAIN_2_ENTER_TO_HH   = ddlTrain2EnterToHH.SelectedIndex;
        config.FP_TRAIN_2_ENTER_TO_MM   = ddlTrain2EnterToMM.SelectedIndex;

        config.FP_TRAIN_3_ENTER_FROM_HH = ddlTrain3EnterFromHH.SelectedIndex;
        config.FP_TRAIN_3_ENTER_FROM_MM = ddlTrain3EnterFromMM.SelectedIndex;
        config.FP_TRAIN_3_ENTER_TO_HH   = ddlTrain3EnterToHH.SelectedIndex;
        config.FP_TRAIN_3_ENTER_TO_MM   = ddlTrain3EnterToMM.SelectedIndex;

        config.FP_TRAIN_1_LEAVE_HH = ddlTrain1LeaveHH.SelectedIndex;
        config.FP_TRAIN_1_LEAVE_MM = ddlTrain1LeaveMM.SelectedIndex;
        config.FP_TRAIN_2_LEAVE_HH = ddlTrain2LeaveHH.SelectedIndex;
        config.FP_TRAIN_2_LEAVE_MM = ddlTrain2LeaveMM.SelectedIndex;
        config.FP_TRAIN_3_LEAVE_HH = ddlTrain3LeaveHH.SelectedIndex;
        config.FP_TRAIN_3_LEAVE_MM = ddlTrain3LeaveMM.SelectedIndex;


        if (SimpleOrmOperator.Update(config))
        {
            WebTools.Alert("配置修改成功");
        }
        else
        {
            WebTools.Alert("配置修改失败");
        }
        FPSystemBiz.CacheFpConfig = null;
    }
Esempio n. 26
0
    /// <summary>
    /// Process user action after operation fingerprint
    /// Notice: if don't process user operation fingerprint then use the TrustLinkGereralControler achieve the Result
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    private void TrustLink_OperDlgPostEvent(object sender, EventArgs e)
    {
        ResultCodeArgs re = (ResultCodeArgs)e;

        string[]        lArrUserIds = FpBase.getUserIds(re);
        FpStudentObject lObjStudent = null;
        int             lIntAction  = ACTION_NONE;

        if (Session[ACTION_NAME] == null)
        {
            return;
        }
        try
        {
            lIntAction = int.Parse(Session[ACTION_NAME].ToString());
        }
        catch (Exception ex)
        {
            lIntAction = ACTION_NONE;
        }
        switch (lIntAction)
        {
        case ACTION_NONE: break;

        case ACTION_NEW_ENROLL_STUDENT:
            string qIDCard = this.txtIDCard.Text;
            lObjStudent = FT.DAL.Orm.SimpleOrmOperator.Query <FpStudentObject>(qIDCard);
            if (lObjStudent == null)
            {
                this.fnUINewEnrollStudentSucess(false);
                return;
            }
            else
            {
                lObjStudent.STATUE = FpStudentObject.STATUE_COLLECT;
                //FPSystemBiz.fnAddOrUpdateStudentRecord(lObjStudent);
                this.fnUINewEnrollStudentSucess(SimpleOrmOperator.Update(lObjStudent));
            }
            break;
        }
    }
Esempio n. 27
0
    protected void btnBatchVerify_Click(object sender, EventArgs e)
    {
        IList <string> idcards  = new List <string>();
        int            checkNum = 0;
        int            reNum    = 0;

        foreach (DataGridItem item in DataGrid1.Items)
        {
            CheckBox cb = (CheckBox)item.FindControl("cbIdCard");
            if (cb.Checked)
            {
                idcards.Add(item.Cells[3].Text);
                checkNum++;
            }
        }

        if (checkNum == 0)
        {
            WebTools.Alert("没有记录被选中");
            return;
        }

        // WebTools.Confirm(string.Format("是否审核选中的{0}条记录?",checkNum));

        foreach (string idcard in idcards)
        {
            FpStudentObject fso = SimpleOrmOperator.Query <FpStudentObject>(idcard);
            fso.FEE_STATUE      = "Y";
            fso.FEE_VERIFY_DATE = DateTime.Now;
            if (SimpleOrmOperator.Update(fso))
            {
                reNum++;
            }
        }

        WebTools.Alert(string.Format("审核结果:选中{0}条记录,{1}条成功通过审核", checkNum, reNum));

        this.ProcedurePager1.Changed = true;
        txtQueryValue.Text           = "";
        txtQueryValue.Focus();
    }
Esempio n. 28
0
    protected void DataGrid1_ItemCommand1(object source, DataGridCommandEventArgs e)
    {
        if (e.CommandName == "Verify")
        {
            string idcard = e.CommandArgument.ToString();
            //ZwTpOperator.Delete(id);
            FpStudentObject fso = SimpleOrmOperator.Query <FpStudentObject>(idcard);
            fso.FEE_STATUE      = "Y";
            fso.FEE_VERIFY_DATE = DateTime.Now;
            if (SimpleOrmOperator.Update(fso))
            {
                WebTools.Alert(this, string.Format("{0}:{1}  交费审核成功!", fso.LSH, fso.NAME));
            }
            else
            {
                WebTools.Alert(this, string.Format("{0}:{1}  交费审核失败!", fso.LSH, fso.NAME));
            }

            this.ProcedurePager1.Changed = true;
        }
        else if (e.CommandName == "DisVerify")
        {
            string idcard = e.CommandArgument.ToString();
            //ZwTpOperator.Delete(id);
            FpStudentObject fso = SimpleOrmOperator.Query <FpStudentObject>(idcard);
            fso.FEE_STATUE      = "N";
            fso.FEE_VERIFY_DATE = default(DateTime);
            if (SimpleOrmOperator.Update(fso))
            {
                WebTools.Alert(this, string.Format("{0}:{1}  交费取消审核成功!", fso.LSH, fso.NAME));
            }
            else
            {
                WebTools.Alert(this, string.Format("{0}:{1}  交费取消审核失败!", fso.LSH, fso.NAME));
            }

            this.ProcedurePager1.Changed = true;
        }
    }
Esempio n. 29
0
    protected void btnCommit_Click(object sender, EventArgs e)
    {
        FpSite site = new FpSite();

        site.ID      = StringHelper.fnFormatNullOrBlankInt(this.lbId.Text, -1);
        site.NAME    = txtSiteName.Text;
        site.LIMIT   = StringHelper.fnFormatNullOrBlankInt(txtSiteLimit.Text, 0);
        site.BUSTYPE = this.dllBustype.SelectedValue;
        site.HOST    = this.txtHost.Text;
        if (SimpleOrmOperator.Update(site))
        {
            WebTools.Alert("修改成功!");
        }
        else if (SimpleOrmOperator.Create(site))
        {
            WebTools.Alert("添加成功!");
        }
        else
        {
            WebTools.Alert("保存失败!");
        }
        FPSystemBiz.DictFpSites.Clear();
    }
Esempio n. 30
0
    public static void Update(WeekRecord week)
    {
        SimpleOrmOperator.Update(week);
        string   datestr = week.WeekRange.Substring(0, week.WeekRange.IndexOf('至'));
        DateTime begin   = DateTimeHelper.GetMonday(DateTime.Parse(datestr));

        DataAccessFactory.GetDataAccess().ExecuteSql("delete from table_yuyue_limit where i_week_num=" + week.WeekNum + " and date_ksrq like '" + begin.Year.ToString() + "%'");


        YuyueLimitOperator.Save(week, 1, 1, datestr, week.Week1km1fp);
        YuyueLimitOperator.Save(week, 1, 2, datestr, week.Week1km2fp);
        YuyueLimitOperator.Save(week, 1, 3, datestr, week.Week1km3fp);

        YuyueLimitOperator.Save(week, 2, 1, datestr, week.Week2km1fp);
        YuyueLimitOperator.Save(week, 2, 2, datestr, week.Week2km2fp);
        YuyueLimitOperator.Save(week, 2, 3, datestr, week.Week2km3fp);

        YuyueLimitOperator.Save(week, 3, 1, datestr, week.Week3km1fp);
        YuyueLimitOperator.Save(week, 3, 2, datestr, week.Week3km2fp);
        YuyueLimitOperator.Save(week, 3, 3, datestr, week.Week3km3fp);

        YuyueLimitOperator.Save(week, 4, 1, datestr, week.Week4km1fp);
        YuyueLimitOperator.Save(week, 4, 2, datestr, week.Week4km2fp);
        YuyueLimitOperator.Save(week, 4, 3, datestr, week.Week4km3fp);

        YuyueLimitOperator.Save(week, 5, 1, datestr, week.Week5km1fp);
        YuyueLimitOperator.Save(week, 5, 2, datestr, week.Week5km2fp);
        YuyueLimitOperator.Save(week, 5, 3, datestr, week.Week5km3fp);

        YuyueLimitOperator.Save(week, 6, 1, datestr, week.Week6km1fp);
        YuyueLimitOperator.Save(week, 6, 2, datestr, week.Week6km2fp);
        YuyueLimitOperator.Save(week, 6, 3, datestr, week.Week6km3fp);

        YuyueLimitOperator.Save(week, 7, 1, datestr, week.Week7km1fp);
        YuyueLimitOperator.Save(week, 7, 2, datestr, week.Week7km2fp);
        YuyueLimitOperator.Save(week, 7, 3, datestr, week.Week7km3fp);
    }