protected void DataGrid1_ItemCommand1(object source, DataGridCommandEventArgs e) { if (e.CommandName == "Clear") { string idcard = e.CommandArgument.ToString(); //ZwTpOperator.Delete(id); FpStudentObject fso = SimpleOrmOperator.Query <FpStudentObject>(idcard); fso.KM3_VERIFY = "Y"; // fso.FEE_VERIFY_DATE = DateTime.Now; //string idcard = fso.IDCARD.Trim('\''); fso.IDCARD = "'" + idcard + "'"; if (SimpleOrmOperator.Delete(fso)) { //fso.IDCARD = fso.IDCARD.Trim('\''); _FP.FpDeleteUser(idcard); if (fso.STATUE >= FpStudentObject.STATUE_KM3_ENTER) { fso.IDCARD = idcard; FpStudentCleared cleared = new FpStudentCleared(fso); SimpleOrmOperator.Create(cleared); } 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; } }
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("修改失败!"); } } }
protected void dgLists_ItemCommand(object source, DataGridCommandEventArgs e) { if (e.CommandName == "Delete") { int id = Convert.ToInt32(e.CommandArgument); FT.DAL.DataAccessFactory.GetDataAccess().ExecuteSql("delete from yuantuo_terminals where id=" + id); WebTools.Alert(this, "删除成功!"); TerminalOnlineMonitorThread.InitTerminalList(); this.ProcedurePager1.Changed = true; } else if (e.CommandName == "Detail") { int id = Convert.ToInt32(e.CommandArgument); this.Pop(id); } else if (e.CommandName == "Open") { int id = Convert.ToInt32(e.CommandArgument); TerminalEntity entity = SimpleOrmOperator.Query <TerminalEntity>(id); FT.Commons.Tools.WindowExHelper.WakeUp(entity.MachineMac); WebTools.Alert(this, "已给终端" + entity.MachineName + "发送开机命令,请稍等片刻!!!"); } else if (e.CommandName == "Close") { int id = Convert.ToInt32(e.CommandArgument); TerminalEntity entity = SimpleOrmOperator.Query <TerminalEntity>(id); WholeBllTools.CloseComputer(entity.MachineIp); WebTools.Alert(this, "已给终端" + entity.MachineName + "发送关机命令,请稍等片刻!!!"); // FT.Commons.Tools.WindowExHelper.WakeUp(entity.MachineMac); } }
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("修改失败!"); } } }
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); }
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("已审核的记录无法审核!"); } }
protected void btnSearch_Click(object sender, EventArgs e) { if (this.txtBeginDate.Value.Length == 0 || this.txtEndDate.Value.Length == 0) { WebTools.Alert(this, "必须选择时间段进行统计!"); return; } string sql = "select "; if (this.DropDownList1.SelectedIndex == 0) { sql += "c_hospital as hospital,"; } else { sql += " c_operator as hospital,"; } sql += " sum(decode(i_state,0,1,0)) as desp1,sum(decode(i_state,1,1,0)) as desp2,0 as desp3,sum(decode(i_state,2,1,0)) as desp4 " + " from table_bus_all_info"; sql += " where regdate between to_date('" + this.txtBeginDate.Value.Trim() + " 00:00:00','yyyy-MM-dd HH24:mi:ss') and to_date('" + this.txtEndDate.Value.Trim() + " 23:59:59','yyyy-MM-dd HH24:mi:ss')"; if (this.DropDownList1.SelectedIndex == 0) { sql += " group by c_hospital"; } else { sql += " group by c_operator"; } DataTable dt = FT.DAL.DataAccessFactory.GetDataAccess().SelectDataTable(sql, "tmpdb"); this.DataGrid1.DataSource = dt; this.DataGrid1.DataBind(); }
protected void DataGrid1_ItemCommand1(object source, DataGridCommandEventArgs e) { if (e.CommandName == "Delete") { int id = Convert.ToInt32(e.CommandArgument); UserInfoOperator.Delete(id); WebTools.Alert(this, "删除成功!"); this.SimplePager1.Changed = true; } else if (e.CommandName == "Detail") { int id = Convert.ToInt32(e.CommandArgument); this.Pop(id); } else if (e.CommandName == "ResetPwd") { int id = Convert.ToInt32(e.CommandArgument); bool result = UserInfoOperator.ResetPwd(id, ConfigurationManager.AppSettings["DefaultPassword"].ToString()); if (result) { WebTools.Alert(this, "密码重置成功!"); } else { WebTools.Alert(this, "密码重置失败!"); } } }
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; } }
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("修改失败!"); } } }
protected void btnQuery_Click(object sender, EventArgs e) { string queryText = ddlQueryType.SelectedItem.Text; string queryType = ddlQueryType.SelectedValue; string quserValue = txtQueryValue.Text; string condition = string.Format("where {0} like '%{1}'", queryType, quserValue); if (string.IsNullOrEmpty(quserValue)) { WebTools.Alert("查询条件不能为空"); return; } ArrayList fsos = SimpleOrmOperator.QueryConditionList <FpStudentObject>(condition); if (fsos.Count == 1) { FpStudentObject fso = fsos[0] as FpStudentObject; fnUILoadStudentRecord(fso, 0); ucStudentInfo.fnUILoadStudentRecord(fso); } else if (fsos.Count == 0) { WebTools.Alert(string.Format("{0}为\"{1}\" 的学员不存在", queryText, quserValue)); } else if (fsos.Count > 1) { WebTools.Alert(string.Format("{0}为\"{1}\" 的学员存在多个,请使用证件号码查询", queryText, quserValue)); } this.txtQueryValue.Text = string.Empty; this.txtQueryValue.Focus(); }
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("修改失败!"); } } }
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("修改失败!"); } } }
protected void btnSubmit_Click(object sender, EventArgs e) { /*select distinct lsh,sfzmhm,xm,kscx,pxshrq,kchp,ykrq,jbr,dmmc1 from drv_admin.drv_preasign t left join drv_admin.drv_code m on m.dmlb=42 * and m.dmz=t.dlr where t.glbm like '4405%'*/ string date = this.txtDate.Value; if (date.Length == 0) { WebTools.Alert(this, "必须选择一个日期!"); return; } string glbm = System.Configuration.ConfigurationManager.AppSettings["DrvHelperSystem_glbm"]; string sql = "select distinct lsh,sfzmhm,decode(kskm,1,'科目一',2,'科目二',3,'科目三') kskm,xm,kscx,to_char(pxshrq,'yyyy-MM-dd') pxshrq,kchp,to_char(ykrq,'yyyy-MM-dd') ykrq,jbr,dmmc1 from drv_admin.drv_preasign t left join drv_admin.drv_code m on m.dmlb=42 and m.dmz=t.dlr "; sql += " where t.glbm like '" + glbm + "%'"; //天排班 if (this.RadioButtonList1.SelectedIndex == 0) { sql += " and trunc(ykrq)=trunc(to_date('" + this.txtDate.Value + "','yyyy-MM-dd'))"; } else if (this.RadioButtonList1.SelectedIndex == 1) { sql += " and trunc(ykrq)=trunc(to_date('" + this.txtDate.Value + "','yyyy-MM-dd'))"; sql += " and kskm= " + this.cbKm.SelectedItem.Value + " and kscc ='" + this.cbKscc.SelectedItem.Value + "'" + " and ksdd='" + this.cbKsdd.SelectedItem.Value + "'"; } IDataAccess access = new OracleDataHelper(System.Configuration.ConfigurationManager.AppSettings["DefaultConnString2"]); DataTable dt = access.SelectDataTable(sql, "tmp"); if (dt != null) { this.DataGrid1.DataSource = dt; this.DataGrid1.DataBind(); } }
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("修改失败!"); } } }
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("修改失败!"); } } }
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("修改失败!"); } } }
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(); }
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("修改失败!"); } } }
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("修改失败!"); } } }
protected void DataGrid1_ItemCommand(object source, DataGridCommandEventArgs e) { //allowcheck int id = Convert.ToInt32(e.CommandArgument); StudentApplyInfoChecked infoCheck = SimpleOrmOperator.Query<StudentApplyInfoChecked>(id); if (e.CommandName == "Delete") { if (infoCheck != null && infoCheck.Checked == 1) { WebTools.Alert(this, "已审核过的数据无法删除!"); } else { SimpleOrmOperator.Delete(infoCheck); WebTools.Alert(this, "删除成功!"); this.ProcedurePager1.Changed = true; } } else if (e.CommandName == "Detail") { //int id = Convert.ToInt32(e.CommandArgument); //this.Pop(id); StudentApplyInfo sai = SimpleOrmOperator.Query<StudentApplyInfo>(id); if (sai == null) return ; if (StudentApplyInfoOperator.CheckInfo(sai, this.Operator.OperatorName)) { WebTools.Alert(string.Format("{0}:{1} 审核成功", sai.Xm, sai.Sfzmhm)); } else { WebTools.Alert(string.Format("{0}:{1} 审核失败", sai.Xm, sai.Sfzmhm)); } } }
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("修改失败!"); } } }
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, "配置系统参数成功!"); }
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); }
protected void DataGrid1_ItemCommand1(object source, DataGridCommandEventArgs e) { if (e.CommandName == "Delete") { int id = Convert.ToInt32(e.CommandArgument); ZwTpOperator.Delete(id); WebTools.Alert(this, "删除成功!"); this.ProcedurePager1.Changed = true; } }
protected void btnSubmit_Click(object sender, EventArgs e) { BusAllInfo info = null; ArrayList infos = SimpleOrmOperator.QueryConditionList <BusAllInfo>(" where c_idcard='" + this.txtIdCard.Text.Trim() + "' and i_state=0"); if (infos.Count != 0) { info = infos[0] as BusAllInfo; this.btnPrintReturn.Enabled = true; this.cbRegArea.SelectedValue = info.RegAreaCode; this.txtRegArea.Text = info.RegArea; this.txtPostCode.Text = info.PostCode; this.txtPhone.Text = info.Phone; this.txtHeight.Text = info.Height; this.txtZsl.Text = info.Zsl; this.txtYsl.Text = info.Ysl; this.cbBsl.Text = info.Bsl; this.cbTl.Text = info.Tl; this.cbSz.Text = info.Sz; this.cbZxz.Text = info.Zxz; this.cbYxz.Text = info.Yxz; this.cbQgjb.Text = info.Qgjb; this.txtCheckDate.Value = info.CheckDate; this.txtHospital.Text = info.Hospital; this.hidLsh.Value = info.Lsh; if (this.txtRegArea.Text.Trim().Length == 0) { this.btnPrintReturn.Enabled = false; this.btnQuitBus.Enabled = true; } else { this.btnPrintReturn.Enabled = true; this.btnQuitBus.Enabled = false; } } else { WebTools.Alert(this, "请先受理该体检人!"); return; // info = DriverInterface.GetFromUser(this.cbIdCardType.SelectedValue.ToString(), this.txtIdCard.Text.Trim(), this.txtDabh1.Text + this.txtDabh2); //this.hidLsh.Value = info.Lsh; } this.lbBrithday.Text = info.Birthday; this.lbDabh.Text = info.Dabh; this.lbIdCard.Text = info.IdCard; this.lbIDCardType.Text = info.IdCardType; this.lbNation.Text = info.Nation; this.lbSex.Text = info.Sex; this.lbXm.Text = info.Xm; this.lbLearnCar.Text = info.CarType; this.lbCheckDay.Text = info.CheckDate; this.imgPerson.ImageUrl = "../../ShowImage.aspx?idcard=" + this.txtIdCard.Text.Trim(); }
protected void btnSearch_Click(object sender, EventArgs e) { begin = this.txtBeginDate.Value; end = this.txtEndDate.Value; if (begin.Length == 0 || end.Length == 0) { WebTools.Alert(this, "必须选择待统计的时间范围!"); return; } this.BindData(); }
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("修改失败!"); } } }
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); } }
protected void btnAdd_Click(object sender, EventArgs e) { /* * ZwTpObject tp = new ZwTpObject(); * tp.Approver = "test"; * tp.ApproveTime = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); * tp.IdCard = this.txtIdCardInput.Text.Trim(); * tp.Name = "testname"; * tp.School ="testschool"; * tp.Type = this.DropDownList1.Text; * ZwTpOperator.Create(tp); */ // TempStudentInfo info=DrvQueryHelper.QueryStudent(WholeWebConfig.Glbm, this.txtIdCard.Text.Trim()); FpStudentObject f = new FpStudentObject(); f.IDCARD = this.txtIdCardInput.Text; FpStudentObject info = SimpleOrmOperator.Query <FpStudentObject>(f.IDCARD); // if (info == null || info.name == null || info.name.Length == 0) if (info == null) { WebTools.Alert(this, "未找到该学员在本车管所报名的信息!"); return; } else { ZwTpObject tp = new ZwTpObject(); tp.Approver = this.Operator.OperatorName; tp.ApproveTime = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); tp.IdCard = this.txtIdCardInput.Text.Trim(); tp.Name = info.NAME; //tp.School = info.jxmc; tp.Type = this.DropDownList1.SelectedItem.Text; ZwTpOperator.Create(tp); this.btnSearch_Click(null, null); info.STATUE = Convert.ToInt32(DropDownList1.SelectedValue); if (ZwTpOperator.Update(info) == true) { WebTools.Alert(this, "特批成功!"); return; } else { WebTools.Alert(this, "特批失败!"); return; } this.btnSearch_Click(null, null); } }