public void Fabu() { RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel; if (sm.SelectedRows.Count > 0) { if (SessionBox.GetUserSession().rolelevel.Contains("1") || SessionBox.GetUserSession().rolelevel.Contains("0")) {//集团公司以上级别发布 RowSelectionModel sm1 = this.GridPanel2.SelectionModel.Primary as RowSelectionModel; if (sm1.SelectedRows.Count == 0) { Ext.Msg.Alert("提示", "请选择发布对象!").Show(); return; } else { for (int i = 0; i < sm1.SelectedRows.Count; i++) { Sysnoticefb noticefb = new Sysnoticefb() { Nid = decimal.Parse(sm.SelectedRow.RecordID), Deptid = sm1.SelectedRows[i].RecordID.Trim(), Beizhu = "", Status = "有效" }; dc.Sysnoticefb.InsertOnSubmit(noticefb); dc.SubmitChanges(); } } var q = dc.Sysnotice.Where(p => p.Nid == decimal.Parse(sm.SelectedRow.RecordID)); foreach (var r in q) { r.Pperid = SessionBox.GetUserSession().PersonNumber; r.Pdeptid = SessionBox.GetUserSession().DeptNumber; r.Pdate = System.DateTime.Today; r.Nstatus = "已发布"; } dc.SubmitChanges(); Ext.Msg.Alert("提示", string.Format("发布成功,共发布给{0}个对象!", sm1.SelectedRows.Count)).Show(); Window1.Hide(); storeload(); } else {//矿级别以下发布 Ext.Msg.Confirm("提示", "是否确认发布此公告?", new MessageBox.ButtonsConfig { Yes = new MessageBox.ButtonConfig { Handler = "Coolite.AjaxMethods.FabuDetail();", Text = "确 定" }, No = new MessageBox.ButtonConfig { Text = "取 消" } }).Show(); } } }
protected void Dialysis_detail(object sender, DirectEventArgs e) { string json = e.ExtraParams["Values"]; Dictionary <string, string>[] selRow = JSON.Deserialize <Dictionary <string, string>[]>(json); _PAT_IC = selRow[0]["pat_ic"].ToString(); _PIF_NAME = selRow[0]["pif_name"].ToString(); _USER_NAME = selRow[0]["pif_docname"].ToString(); _PIF_SX = selRow[0]["pif_sex"].ToString() + "性"; string sql = "SELECT pif_id, pif_name, pif_docname FROM pat_info "; sql += " where pif_ic = '" + _PAT_IC + "' "; DataTable dt = db.Query(sql); if (dt.Rows.Count > 0) { if (dt.Rows[0]["pif_docname"].ToString() != null) { _PatDocName = dt.Rows[0]["pif_docname"].ToString(); } else { _PatDocName = ""; } Session["PAT_ID"] = dt.Rows[0]["pif_id"].ToString(); _PAT_ID = Session["PAT_ID"].ToString(); Store istore = GridList.GetStore(); istore.RemoveAll(); Window1.Hide(); Load_Appointment(); } }
/// <summary> /// 选择模版保存事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// <returns></returns> protected void ButOKClick(object sender, DirectEventArgs e) { try { if (Session["templatepage"] != null) { TemplateInfo templateInfo = Session["templatepage"] as TemplateInfo; UserInfo userinfo = Session["userinfo"] as UserInfo; int res = settingManager.UpdateTemplatePageInfo(ButData.Value.ToString(), templateInfo.TemplateId, userinfo.UserCode); if (res > 0) { userinfo.UserTemplate = templateInfo.TemplatePage; Session["userinfo"] = null; Session["userinfo"] = userinfo; Window1.Hide(); InitForm(); } } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("UserTemplate.aspx-ButOKClick", ex.Message + ";" + ex.StackTrace, "ButOKClicks has an exception"); } }
public void Search() { //SearchLoad(); Gridload(); Window1.Hide(); GridPanel1.Show(); }
public void Search() { //SearchLoad(); storeload(); Window1.Hide(); //GridPanel1.Show(); }
public void Search()//点击查询按钮 { //storeload(); //Ext.DoScript("#{Store1}.reload();"); //Ext.DoScript("#{Store1}.load({params:{start:0,limit:" + PagingToolBar1.PageSize + "}});"); storeload(); Window1.Hide(); GridPanel1.Show(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!string.IsNullOrEmpty(Request["ID"])) { Window1.Hide(); string id = Request["ID"]; } } }
protected void btnKaydet_DirectClick(object sender, DirectEventArgs e) { if (txtPlate.Text == "") { X.Msg.Alert("UYARI", "Boş Alan Bırakmayınız.").Show(); return; } if (txtModel.Text == "") { X.Msg.Alert("UYARI", "Boş Alan Bırakmayınız.").Show(); return; } if (Convert.ToInt32(txtMaxPassenger.Value) <= 0) { X.Msg.Alert("UYARI", "Boş Alan Bırakmayınız.").Show(); return; } BusService service = new BusService(); if (TextbusId.Text == "") { Bus bus = new Bus() { plate = txtPlate.Text, busModel = txtModel.Text, maxBusPessenger = Convert.ToInt32(txtMaxPassenger.Value) }; service.saveOrUpdate(bus); } else { Bus bus = new Bus() { busId = Convert.ToInt32(TextbusId.Text), plate = txtPlate.Text, busModel = txtModel.Text, maxBusPessenger = Convert.ToInt32(txtMaxPassenger.Value) }; service.saveOrUpdate(bus); } txtMaxPassenger.Clear(); txtModel.Clear(); txtPlate.Clear(); X.Msg.Alert("UYARI", "Bilgiler kayıt edilmiştir.").Show(); Window1.Hide(this.Form); btnGetAccounts_DirectClick(new object(), new DirectEventArgs(null)); }
protected void btnKaydet_DirectClick(object sender, DirectEventArgs e) { if (txtstationName.Text == "") { X.Msg.Alert("UYARI", "Boş Alan Bırakmayınız.").Show(); return; } if (txtlocation.Text == "") { X.Msg.Alert("UYARI", "Boş Alan Bırakmayınız.").Show(); return; } if (txtaddress.Text == "") { X.Msg.Alert("UYARI", "Boş Alan Bırakmayınız.").Show(); return; } StationService service = new StationService(); if (txtstationId.Text == "") { Station station = new Station() { stationName = txtstationName.Text, location = txtlocation.Text, address = txtaddress.Text, }; service.saveOrUpdate(station); } else { Station station = new Station() { stationId = Convert.ToInt32(txtstationId.Text), stationName = txtstationName.Text, location = txtlocation.Text, address = txtaddress.Text, }; service.saveOrUpdate(station); } txtaddress.Clear(); txtlocation.Clear(); txtstationName.Clear(); X.Msg.Alert("UYARI", "Bilgiler kayıt edilmiştir.").Show(); Window1.Hide(this.Form); btnGetAccounts_DirectClick(new object(), new DirectEventArgs(null)); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { TextHelper tp = new TextHelper(); string sys = Request["sys"] == null ? "" : Request["sys"]; txtLot.Text = tp.getPre(sys); txtInvoice.Text = tp.getPre(sys); txtLot.Focus(); tp.SetFocusAtLast("txtLot"); if (!string.IsNullOrEmpty(Request["ID"])) { Window1.Hide(); string id = Request["ID"]; //DataBinder(id); } } }
protected void SifreKontrol() { if (Class.Fonksiyonlar.Admin.Kullanici.Kontroller.Sifre(Class.Fonksiyonlar.Genel.SQLTemizle(txtUsername.Text.Trim()), Class.Fonksiyonlar.Admin.Genel.SifreOlustur(Class.Fonksiyonlar.Genel.SQLTemizle(txtPassword.Text.Trim())))) { #region Admin Session Ver Application.Lock(); if (!Class.Fonksiyonlar.Admin.Genel.SessionKontrol()) { Objeler.Tanimlar.Admin D = new Objeler.Tanimlar.Admin(); D.ID = Class.Fonksiyonlar.Admin.Kullanici.Cagir.ID(Class.Fonksiyonlar.Genel.SQLTemizle(txtUsername.Text.Trim())); D.Root = Class.Fonksiyonlar.Admin.Kullanici.Kontroller.Root(D.ID); D.SessionID = Session.SessionID; D.Tarih = DateTime.Now; D.IP = Request.ServerVariables["REMOTE_ADDR"]; Objeler.Listeler.Admin.Add(D); } Application.UnLock(); #endregion #region Admin Logla Class.Fonksiyonlar.Admin.Log.Oturum(Class.Fonksiyonlar.Admin.Genel.AdminID(), (int)Class.Sabitler.AdminLog.Oturum.Giris, (int)Class.Sabitler.KullaniciTip.Admin); #endregion Window1.Hide(); if (Request.QueryString["s"] != null) { Class.Fonksiyonlar.ExtJS.YukleyerekYonlendir(Request.QueryString["s"].ToString(), "Geldiğiniz sayfaya yönlendiriliyorsunuz"); } else { Class.Fonksiyonlar.ExtJS.YukleyerekYonlendir("panel.aspx?rnd=" + (DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond), "Kontrol paneli yükleniyor"); } } else { #region Admin Hata Log Class.Fonksiyonlar.Admin.Log.Hatalar(null, Class.Fonksiyonlar.Genel.SQLTemizle(txtUsername.Text.Trim()), (int)Class.Sabitler.AdminLog.Hatalar.SifreYanlis, (int)Class.Sabitler.KullaniciTip.Admin); #endregion Class.Fonksiyonlar.ExtJS.MesajKutusu(Icon.Error, MessageBox.Icon.ERROR, "Hatalı Şifre", "Eksik veya yanlış şifre girdiniz.<br/>Lütfen şifrenizi kontrol ederek yeniden deneyiniz."); } }
protected void OnPutin_Click(object sender, DirectEventArgs e) { try { string sSQL = ""; if (txt_putinqty.Text != "" && txt_putinqty.Text != "0") { string serialno = DateTime.Now.ToString("yyyyMMddHHmmss"); string toDay = DateTime.Now.ToString("yyyy-MM-dd"); sSQL = "INSERT INTO inv_received (ivrec_code, ivrec_name, ivrec_serialno, ivrec_amt, ivrec_daterec, ivrec_user) "; sSQL += "VALUES('" + txt_ctg.Text + "',"; sSQL += "'" + txt_name.Text + "',"; sSQL += "'" + serialno + "',"; sSQL += "'" + txt_putinqty.Text + "',"; sSQL += "'" + toDay + "',"; sSQL += "'" + Session["USER_NAME"].ToString() + "'); "; } else { txt_putinqty.Text = "0"; } int amt = int.Parse(txt_invamt.Text) + int.Parse(txt_putinqty.Text); int amt1 = int.Parse(txt_inamt.Text) + int.Parse(txt_putinqty.Text); sSQL += "UPDATE inventory_stock SET "; sSQL += "invs_invamt='" + amt.ToString() + "',"; sSQL += "invs_inamt='" + amt1.ToString() + "',"; sSQL += "invs_minstock='" + txt_safeqty.Text + "',"; sSQL += "price=" + txt_price.Text + ","; sSQL += "cost=" + txt_cost.Text + " "; sSQL += "WHERE invs_name='" + txt_name.Text + "';"; db.Excute(sSQL); Window1.Hide(); LoadGridPanelStock(); Common._NotificationShow("入庫单,存盘成功!"); } catch (Exception) { Common._ErrorMsgShow("入庫单,存盘失败"); } }
/// <summary> ///更新事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void GengXin_Click(object sender, DirectEventArgs e) { try { string ID = Guid.NewGuid().ToString(); Hashtable hs = new Hashtable(); //当没选择所属单位的时候 默认为371600000000 必须要DEPARTID if (string.IsNullOrEmpty(uiDepartment1.DepertId)) { hs.Add("DEPARTID", "371600000000"); } else { hs.Add("DEPARTID", uiDepartment1.DepertId); } hs.Add("NAME", this.TxtName.Text.ToString()); //警号 if (TxtSiren.Text != "") { // if(TxtSiren.Text== ){ hs.Add("SIREN", this.TxtSiren.Text.ToString()); //} } else { hs.Add("SIREN", ""); } if (this.CmbRanks.SelectedIndex != -1) { hs.Add("RANKS", this.CmbRanks.Text.ToString()); } else { hs.Add("RANKS", ""); } if (this.CmbDuty.SelectedIndex != -1) { hs.Add("PROFESSION", this.CmbDuty.Text.ToString()); } else { hs.Add("PROFESSION", ""); } if (this.CmbFormat.SelectedIndex != -1) { hs.Add("PREPARATIONTYPE", this.CmbFormat.Text.ToString()); } else { hs.Add("PREPARATIONTYPE", ""); } if (this.CmbTeQin.SelectedIndex != -1) { hs.Add("SECRETLEVEL", this.CmbTeQin.Text.ToString()); } else { hs.Add("SECRETLEVEL", ""); } hs.Add("PHONE", this.TxtPhone.Text.ToString()); if (TxtHandSets.Text != "") { hs.Add("HANDSETS", this.TxtHandSets.Text.ToString()); } else { hs.Add("HANDSETS", ""); } if (TxtOfficePhone.Text != "") { hs.Add("OFFICEPHONE", this.TxtOfficePhone.Text.ToString()); } else { hs.Add("OFFICEPHONE", ""); } if (TxtHandSetsCode.Text != "") { hs.Add("HANDSETSCODE", this.TxtHandSetsCode.Text.ToString()); } else { hs.Add("HANDSETSCODE", ""); } if (TxtHandSetsGroup.Text != "") { hs.Add("HANDSETSGROUP", this.TxtHandSetsGroup.Text.ToString()); } else { hs.Add("HANDSETSGROUP", ""); } if (this.CmbMale.SelectedIndex != -1) { hs.Add("SEX", this.CmbMale.Text.ToString()); } else { hs.Add("SEX", ""); } if (TxtAddress.Text != "") { hs.Add("ADDRESS", this.TxtAddress.Text.ToString()); } else { hs.Add("ADDRESS", ""); } string lurutime = DateField1.SelectedDate.ToString("yyyy-MM-dd") + " 00:00:00"; hs.Add("BIRTHDAY", lurutime); if (TxtEqip.Text != "") { hs.Add("POLICEEQUIPMENT", TxtEqip.Text.ToString()); } else { hs.Add("POLICEEQUIPMENT", ""); } if (TxtIdNo.Text != "") { hs.Add("IDNO", TxtIdNo.Text.ToString()); } else { hs.Add("IDNO", ""); } DataTable dt = Session["datatable"] as DataTable; if (Hidden1.Value.ToString() == "1") { DataRow[] rows = dt.Select("col9 ='" + TxtSiren.Text.ToString() + "'"); if (rows.Length > 0) { Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("PoliceOfficer52", "警号重复")); return; } hs.Add("USERCODE", serviceManager.GetRecordID()); if (serviceManager.insertSevice(hs) > 0) { Window1.Hide(); Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("policeOffcer53", "添加成功")); lblname = ""; lblname += Bll.Common.AssembleRunLog("", TxtName.Text, GetLangStr("PoliceOfficer18", "姓名"), "0"); lblname += Bll.Common.AssembleRunLog("", xbie, GetLangStr("PoliceOfficer19", "性别"), "0"); lblname += Bll.Common.AssembleRunLog("", TxtSiren.Text, GetLangStr("PoliceOfficer20", "警号"), "0"); logManager.InsertLogRunning(uName, GetLangStr("PoliceOfficer50", "添加") + lblname, nowIp, "1"); GridDataBind(GetWhere()); BuildTree(TreePanel1.Root); TreePanel1.Render(); } else { Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("policeOffcer53", "添加失败")); } } if (Hidden1.Value.ToString() == "2") { DataRow[] rows = dt.Select("col9 ='" + TxtSiren.Text.ToString() + "'"); if (rows.Length > 1) { Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("PoliceOfficer52", "警号重复")); return; } hs.Add("USERCODE", Hidden_id.Value.ToString()); if (serviceManager.updateSevice(hs) > 0) { Window1.Hide(); Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("policeOffcer22", "修改成功")); string sw1 = uiDepartment1.DepertName; // 所属单位 string xb1 = CmbMale.Text; //性别 string xm1 = TxtName.Text; //姓名 string cq1 = DateField1.Text; //出生日期 string jz1 = TxtAddress.Text; //家庭住址 string sh1 = TxtIdNo.Text; //身份证号 string jh1 = TxtSiren.Text; //警号 string jx1 = CmbRanks.Text; //警衔 string xw1 = CmbDuty.Text; //现职务 string bb1 = CmbFormat.Text; //编制类别 string tb1 = CmbTeQin.Text; //特勤类别 string sj1 = TxtPhone.Text; //手机 string bh1 = TxtOfficePhone.Text; //办公电话 string st1 = TxtHandSets.Text; //手台 string sth1 = TxtHandSetsCode.Text; //手台呼号 string szh1 = TxtHandSetsGroup.Text; ///手台组号 string jb1 = TxtEqip.Text; //警用装备 this.Hidden_name.Value = xm1; lblname = ""; lblname += Bll.Common.AssembleRunLog(sw, sw1, GetLangStr("PoliceOfficer26", "所属单位"), "0"); lblname += Bll.Common.AssembleRunLog(xm, xm1, GetLangStr("PoliceOfficer29", "姓名"), "0"); lblname += Bll.Common.AssembleRunLog(cq, cq1, GetLangStr("PoliceOfficer30", "出生日期"), "0"); lblname += Bll.Common.AssembleRunLog(jz, jz1, GetLangStr("PoliceOfficer31", "家庭住址"), "0"); lblname += Bll.Common.AssembleRunLog(sh, sh1, GetLangStr("PoliceOfficer32", "身份证号"), "0"); lblname += Bll.Common.AssembleRunLog(jh, jh1, GetLangStr("PoliceOfficer33", "警号"), "0"); lblname += Bll.Common.AssembleRunLog(jx, jx1, GetLangStr("PoliceOfficer34", "警衔"), "0"); lblname += Bll.Common.AssembleRunLog(xw, xw1, GetLangStr("PoliceOfficer36", "现职务"), "0"); lblname += Bll.Common.AssembleRunLog(bb, bb1, GetLangStr("PoliceOfficer38", "编制类别"), "0"); lblname += Bll.Common.AssembleRunLog(tb, tb1, GetLangStr("PoliceOfficer40", "特勤级别"), "0"); lblname += Bll.Common.AssembleRunLog(sj, sj1, GetLangStr("PoliceOfficer42", "手机"), "0"); lblname += Bll.Common.AssembleRunLog(bh, bh1, GetLangStr("PoliceOfficer43", "办公电话"), "0"); lblname += Bll.Common.AssembleRunLog(st, st1, GetLangStr("PoliceOfficer44", "手台"), "0"); lblname += Bll.Common.AssembleRunLog(sth, sth1, GetLangStr("PoliceOfficer45", "手台呼号"), "0"); lblname += Bll.Common.AssembleRunLog(szh, szh1, GetLangStr("PoliceOfficer46", "手台组号"), "0"); lblname += Bll.Common.AssembleRunLog(jb, jb1, GetLangStr("PoliceOfficer47", "警用装备"), "0"); if (!xb.Equals(xb1)) { if (Convert.ToInt32(xb1) == 0) { xb1 = GetLangStr("PoliceOfficer37", "女"); // return; } if (Convert.ToInt32(xb1) == 1) { xb1 = GetLangStr("PoliceOfficer39", "男"); //return; } if (Convert.ToInt32(xb1) == 2) { xb1 = GetLangStr("PoliceOfficer61", "自定义"); //return; } lblname += GetLangStr("PoliceOfficer27", ";性别:") + xb1; } logManager.InsertLogRunning(uName, GetLangStr("PoliceOfficer13", "修改[") + xm1 + GetLangStr("PoliceOfficer62", "]用户:") + lblname, nowIp, "1"); GridDataBind(GetWhere()); BuildTree(TreePanel1.Root); TreePanel1.Render(); } else { Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("policeOffcer52", "修改失败")); } } FrmClear(); } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("PoliceOfficer.aspx-GengXin_Click", ex.Message + ";" + ex.StackTrace, "GengXin_Click has an exception"); } }
protected void Win_Close(object sender, DirectEventArgs e) { Window1.Hide(); }
protected void BTN_Search(object sender, DirectEventArgs e) { string tcks = "0"; if (CK.Checked == true) { tcks = "1"; } if (HH.Value == "") { int r = dbs.ExeSql("insert into Eagent(Owner,OwnerID,PAgent,PAgentID,Bdate,Edate,St,CrededDate) values('" + Session["UserName"] + "','" + Session["UserID"] + "','" + DLUser.SelectedItem.Text + "','" + DLUser.Value + "','" + TXTBdate.Text + "','" + TXTEdate.Text + "','" + tcks + "','" + DateTime.Now.ToString() + "')"); DBB(); Window1.Hide(); if (r > 0) { X.Msg.Show(new MessageBoxConfig { Title = "Message", Message = "保存成功", Buttons = MessageBox.Button.OK, Width = 320, Icon = MessageBox.Icon.INFO }); } else { X.Msg.Show(new MessageBoxConfig { Title = "Message", Message = "保存失败", Buttons = MessageBox.Button.OK, Width = 320, Icon = MessageBox.Icon.INFO }); } } else { int r = dbs.ExeSql("update Eagent set PAgent='" + DLUser.SelectedItem.Text + "',PAgentID='" + DLUser.Value + "',Bdate='" + TXTBdate.Text + "',Edate='" + TXTEdate.Text + "',St='" + tcks + "',CrededDate='" + DateTime.Now.ToString() + "' where id=" + HH.Value); HH.Value = ""; DBB(); Window1.Hide(); if (r > 0) { X.Msg.Show(new MessageBoxConfig { Title = "Message", Message = "保存成功", Buttons = MessageBox.Button.OK, Width = 320, Icon = MessageBox.Icon.INFO }); } else { X.Msg.Show(new MessageBoxConfig { Title = "Message", Message = "保存失败", Buttons = MessageBox.Button.OK, Width = 320, Icon = MessageBox.Icon.INFO }); } } }
public void Search() { storeload(); Window1.Hide(); GridPanel1.Show(); }
/// <summary> /// 添加运维信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// <returns></returns> protected void ButAdd_Click(object sender, DirectEventArgs e) { try { string ID = Math.Abs(Guid.NewGuid().ToString().GetHashCode()).ToString(); string device_id = "SHEBEI" + hidder.Text; string kssj = DateTime.Parse(starttime).ToString("yyyy-MM-dd HH:mm:ss"); string jssj = DateTime.Parse(endtime).ToString("yyyy-MM-dd HH:mm:ss"); //string lurutime = date_lurutiem.SelectedDate.ToString("yyyy-MM-dd") + " " + this.time_luru.Text.ToString(); //string lurutime = Convert.ToDateTime(date_lurutiem.Text).ToString("yyyy-MM-dd") + " " + this.time_luru.Text.ToString(); //string shtime = Convert.ToDateTime(date_shtime.Text).ToString("yyyy-MM-dd") + " " + this.time_sh.Text.ToString(); Hashtable hs = new Hashtable(); hs.Add("id", ID); hs.Add("device_id", device_id); hs.Add("openration_people", this.txt_lurupeople.Text.ToString()); hs.Add("openration_time", kssj); hs.Add("openration_event", this.txt_shuoming.Text.ToString()); hs.Add("openration_type", this.com_operationtype.Value); hs.Add("openration_unit", this.com_operationdanwei.Value); hs.Add("openration_auditor", this.txt_shpeople.Text.ToString()); hs.Add("openration_opinion", this.txt_shyijian.Text.ToString()); hs.Add("openration_revtime", jssj); if (deviceManager.insertOperation(hs) > 0) { int pageIndex = PagingToolbar1.PageIndex; GridDataBind(GetWhere(), pageIndex); DataTable da = deviceManager.GetOperation(" 1=1 AND device_id='" + device_id + "' "); SroPenation.DataSource = da; SroPenation.DataBind(); Window1.Hide(); string lblname = ""; lblname += Bll.Common.AssembleRunLog("", com_operationtype.SelectedItem.Text, GetLangStr("DeviceOperation34", "维护方式"), "0"); lblname += Bll.Common.AssembleRunLog("", com_operationdanwei.SelectedItem.Text, GetLangStr("DeviceOperation28", "申请单位"), "0"); lblname += Bll.Common.AssembleRunLog("", txt_lurupeople.Text, GetLangStr("DeviceOperation27", "申请人"), "0"); lblname += Bll.Common.AssembleRunLog("", kssj, GetLangStr("DeviceOperation29", "录入时间"), "0"); lblname += Bll.Common.AssembleRunLog("", txt_shuoming.Text, GetLangStr("DeviceOperation39", "录入说明"), "0"); lblname += Bll.Common.AssembleRunLog("", txt_shpeople.Text, GetLangStr("DeviceOperation40", "审核人"), "0"); lblname += Bll.Common.AssembleRunLog("", jssj, GetLangStr("DeviceOperation41", "审核时间"), "0"); lblname += Bll.Common.AssembleRunLog("", txt_shyijian.Text, GetLangStr("DeviceOperation42", "审核意见"), "0"); logManager.InsertLogRunning(uName, GetLangStr("DeviceOperation21", "新增:") + lblname, nowIp, "1"); Notice(GetLangStr("DeviceOperation70", "信息提示"), GetLangStr("DeviceOperation71", "添加成功")); //BuildTree(TreePanel1.Root); //TreePanel1.Render(); //重新加载行事件 DataTable dt = deviceManager.GetOperation(" 1=1 AND device_id='shebei" + tyeid + "' "); SroPenation.DataSource = dt; } qingkongadd(); } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("DeviceOperation.aspx-ButAdd_Click", ex.Message + ";" + ex.StackTrace, "ButAdd_Click has an exception"); } }
void bg_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { splash.Hide(); }
protected void btnCancel_DirectClick(object sender, DirectEventArgs e) { Window1.Hide(); }
protected void BTN_Search(object sender, DirectEventArgs e) { if (HH.Value == "") { int CT = int.Parse(dbs.ExeSqlScalar("select count(*) from ESUser where Userid='" + DLUser.Value + "'")); if (CT <= 0) { int r = dbs.ExeSql("insert into ESUser(Userid,UserName,Station,Currency) values('" + DLUser.Value + "','" + DLUser.SelectedItem.Text + "','" + DLStation.SelectedItem.Text + "','" + DLCurrency.SelectedItem.Text + "')"); DBB(); Window1.Hide(); if (r > 0) { X.Msg.Show(new MessageBoxConfig { Title = "Message", Message = "保存成功", Buttons = MessageBox.Button.OK, Width = 320, Icon = MessageBox.Icon.INFO }); } else { X.Msg.Show(new MessageBoxConfig { Title = "Message", Message = "保存失败", Buttons = MessageBox.Button.OK, Width = 320, Icon = MessageBox.Icon.INFO }); } } else { X.Msg.Show(new MessageBoxConfig { Title = "Message", Message = "该用户币种表已经存在,请点击修改", Buttons = MessageBox.Button.OK, Width = 320, Icon = MessageBox.Icon.INFO }); } } else { int r = dbs.ExeSql("update ESUser set Currency='" + DLCurrency.SelectedItem.Text + "' where id=" + HH.Value); HH.Value = ""; DBB(); Window1.Hide(); if (r > 0) { X.Msg.Show(new MessageBoxConfig { Title = "Message", Message = "保存成功", Buttons = MessageBox.Button.OK, Width = 320, Icon = MessageBox.Icon.INFO }); } else { X.Msg.Show(new MessageBoxConfig { Title = "Message", Message = "保存失败", Buttons = MessageBox.Button.OK, Width = 320, Icon = MessageBox.Icon.INFO }); } } }
/// <summary> /// 添加或更新重点车辆信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void GengXin_Click(object sender, DirectEventArgs e) { try { //储存修改前数据 string[] updt = new string[] { uiDepartment1.DepertName, TxtHphm.Text, CmbHpzl.Value.ToString(), }; UserInfo userinfo = Session["userinfo"] as UserInfo; Hashtable hs = new Hashtable(); //当所属机构为空时 默认为 if (string.IsNullOrEmpty(uiDepartment1.DepertId)) { hs.Add("GLBM", userinfo.DeptCode); } else { hs.Add("GLBM", uiDepartment1.DepertId); } hs.Add("HPHM", VehicleHead.VehicleText + this.TxtHphm.Text.ToUpper()); if (!string.IsNullOrEmpty(TxtClxh.Text)) { hs.Add("CLXH", this.TxtClxh.Text.ToString()); } else { hs.Add("CLXH", ""); } if (!string.IsNullOrEmpty(TxtCjh.Text)) { hs.Add("CJH", this.TxtCjh.Text.ToString()); } else { hs.Add("CJH", ""); } if (!string.IsNullOrEmpty(TxtFdjh.Text)) { hs.Add("FDJH", this.TxtFdjh.Text.ToString()); } else { hs.Add("FDJH", ""); } if (!string.IsNullOrEmpty(TxtHdkl.Text)) { hs.Add("HDKL", this.TxtHdkl.Text.ToString()); } else { hs.Add("HDKL", ""); } if (TxtSjxm.Text != "") { hs.Add("SJXM", this.TxtSjxm.Text.ToString()); } else { hs.Add("SJXM", ""); } if (!string.IsNullOrEmpty(TxtLxdh.Text)) { hs.Add("LXDH", this.TxtLxdh.Text.ToString()); } else { hs.Add("LXDH", ""); } if (!string.IsNullOrEmpty(TxtSjhm.Text)) { hs.Add("SJHM", this.TxtSjhm.Text.ToString()); } else { hs.Add("SJHM", ""); } if (!string.IsNullOrEmpty(TxtHjhm.Text)) { hs.Add("HJHM", this.TxtHjhm.Text.ToString()); } else { hs.Add("HJHM", ""); } hs.Add("HPZL", this.CmbHpzl.Text.ToString()); if (this.CmbClzl.SelectedIndex != -1) { hs.Add("CLZL", this.CmbClzl.Text.ToString()); } else { hs.Add("CLZL", ""); } if (this.CmbGPS.SelectedIndex != -1) { hs.Add("GPS", this.CmbGPS.Text.ToString()); } else { hs.Add("GPS", ""); } string lurutime = DateField1.SelectedDate.ToString("yyyy-MM-dd") + " 00:00:00"; hs.Add("GZRQ", lurutime); if (!string.IsNullOrEmpty(TxtRyzk.Text)) { hs.Add("RYZK", this.TxtRyzk.Text.ToString()); } else { hs.Add("RYZK", ""); } if (!string.IsNullOrEmpty(TxtClpp.Text)) { hs.Add("CLPP", this.TxtClpp.Text.ToString()); } else { hs.Add("CLPP", ""); } if (!string.IsNullOrEmpty(TxtClzt.Text)) { hs.Add("CLZT", this.TxtClzt.Text.ToString()); } else { hs.Add("CLZT", ""); } if (!string.IsNullOrEmpty(this.TimeStart.Value.ToString())) { hs.Add("KSSJ", this.TimeStart.Value.ToString().Substring(0, 5)); } else { hs.Add("KSSJ", ""); } if (!string.IsNullOrEmpty(this.TimeEnd.Value.ToString())) { hs.Add("JSSJ", this.TimeEnd.Value.ToString().Substring(0, 5)); } else { hs.Add("JSSJ", ""); } if (Session["stationlist"] != null) { List <string> listid = Session["stationlist"] as List <string>; string kkids = ""; for (int i = 0; i < listid.Count; i++) { kkids += (i == 0 ? "" : ",") + listid[i]; } hs.Add("KKIDS", kkids); } else { hs.Add("KKIDS", ""); } if (Hidden1.Value.ToString() == "1") { string ID = Math.Abs(Guid.NewGuid().ToString().GetHashCode()).ToString(); hs.Add("ID", ID); if (serviceManager.insertVehicles(hs) > 0) { Window1.Hide(); Notice(GetLangStr("ImportantManager61", "信息提示"), GetLangStr("ImportantManager62", "添加成功")); GridDataBind(GetWhere()); BuildTree(TreePanel1.Root); TreePanel1.Render(); //添加记录日志 logManager.InsertLogRunning(userinfo.UserName, "" + GetLangStr("ImportantManager63", "添加:") + "" + ID + Request.QueryString["type"], userinfo.NowIp, "1"); } } if (Hidden1.Value.ToString() == "2") { hs.Add("ID", Hidden_id.Value.ToString()); if (serviceManager.updateVehicles(hs) > 0) { Window1.Hide(); Notice(GetLangStr("ImportantManager61", "信息提示"), GetLangStr("ImportantManager64", "修改成功")); //Ext.Net.X.Msg.Alert(GetLangStr("ImportantManager51", "信息提示"), GetLangStr("ImportantManager52", "修改成功")).Show(); GridDataBind(GetWhere()); BuildTree(TreePanel1.Root); TreePanel1.Render(); //修改记录日志 } } FrmClear(); } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("ImportantManager.aspx-GengXin_Click", ex.Message + ";" + ex.StackTrace, "GengXin_Click has an exception"); } }
/// <summary> ///添加功能 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Add_Fac(object sender, DirectEventArgs e) { try { if (num == 0) { try { NoticePicInfo info = new NoticePicInfo(); info.Id = DateTime.Now.ToString("yyyyMMddHHmmss"); info.PicName = txtNewPicName.Text; info.Name = txtNewName.Text; info.Wfxw = txtNewWfxw.Text; info.DicDisc = txtNewPicDisc.Text; if (Session["userinfo"] != null) { info.Lrr = (Session["userinfo"] as UserInfo).UserName; } else { info.Lrr = "admin"; } info.Lrsj = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); PublicPath = settingManager.GetSettingPublicPath("00"); if (FileUploadField1.HasFile) { string typepic = FileUploadField1.PostedFile.ContentType; //获取图片上传格式 int imgsize = FileUploadField1.PostedFile.ContentLength; //获取图片大小 if (typepic == "image/bmp" || typepic == "image/gif" || typepic == "image/pjpeg" || typepic == "image/x-png" || typepic == "image/png" || typepic == "image/jpg" || typepic == "image/jpeg") { string savepic = FileUploadField1.PostedFile.FileName.ToString(); FileInfo ff = new FileInfo(savepic); string newp = ff.Name; string savetu = Server.MapPath("~/Capture/" + newp); FileUploadField1.PostedFile.SaveAs(savetu); info.PicUrl = PublicPath + "//" + newp + ""; } } if (noticeManager.AddNoticePic(info) > 0) { string lblname = ""; lblname += Bll.Common.AssembleRunLog("", info.Name, GetLangStr("NoticePicManager10", "公告名称"), "0"); lblname += Bll.Common.AssembleRunLog("", info.PicName, GetLangStr("NoticePicManager11", "公告简称"), "0"); lblname += Bll.Common.AssembleRunLog("", info.Wfxw, GetLangStr("NoticePicManager13", "违法行为"), "0"); lblname += Bll.Common.AssembleRunLog("", info.DicDisc, GetLangStr("NoticePicManager39", "描述"), "0"); lblname += Bll.Common.AssembleRunLog("", info.PicUrl, GetLangStr("NoticePicManager18", "文件"), "0"); logManager.InsertLogRunning(uName, GetLangStr("NoticePicManager41", "添加:") + lblname, nowIp, "1"); Notice(GetLangStr("NoticePicManager22", "信息提示"), GetLangStr("NoticePicManager23", "添加成功")); TbutQueryClick(null, null); DataRow[] dt = dtgg.Select("col0='" + info.Id + "'"); gg = dt[0]["col1"].ToString(); gj = dt[0]["col2"].ToString(); ms = dt[0]["col3"].ToString(); wx = dt[0]["col4"].ToString(); lj = dt[0]["col7"].ToString(); Window1.Hide(); } else { Notice(GetLangStr("NoticePicManager22", "信息提示"), GetLangStr("NoticePicManager24", "添加失败")); } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("NoticePicManager.aspx-Add_Fac", ex.Message + ";" + ex.StackTrace, "StoreDataBind has an exception"); } } else if (num == 1)//修改 { try { NoticePicInfo info = new NoticePicInfo(); info.Id = ggid; info.PicName = txtNewPicName.Text; info.Name = txtNewName.Text; info.Wfxw = txtNewWfxw.Text; info.DicDisc = txtNewPicDisc.Text; PublicPath = settingManager.GetSettingPublicPath("00"); if (FileUploadField1.HasFile) { string typepic = FileUploadField1.PostedFile.ContentType; //获取图片上传格式 int imgsize = FileUploadField1.PostedFile.ContentLength; //获取图片大小 if (typepic == "image/bmp" || typepic == "image/gif" || typepic == "image/pjpeg" || typepic == "image/x-png" || typepic == "image/png" || typepic == "image/jpg" || typepic == "image/jpeg") { string savepic = FileUploadField1.PostedFile.FileName.ToString(); FileInfo ff = new FileInfo(savepic); string newp = ff.Name; string savetu = Server.MapPath("~/Capture/" + newp); FileUploadField1.PostedFile.SaveAs(savetu); info.PicUrl = PublicPath + "//" + newp; } } if (noticeManager.EditNoticePic(info) > 0) { string gg1 = txtNewPicName.Text; string gj1 = txtNewName.Text; string wx1 = txtNewWfxw.Text; string ms1 = txtNewPicDisc.Text; string lj1 = info.PicUrl; string lblname = ""; lblname += Bll.Common.AssembleRunLog(gg, gg1, GetLangStr("NoticePicManager10", "公告名称"), "2"); lblname += Bll.Common.AssembleRunLog(gj, gj1, GetLangStr("NoticePicManager11", "公告简称"), "2"); lblname += Bll.Common.AssembleRunLog(wx, wx1, GetLangStr("NoticePicManager13", "违法行为"), "2"); lblname += Bll.Common.AssembleRunLog(ms, ms1, GetLangStr("NoticePicManager39", "描述"), "2"); lblname += Bll.Common.AssembleRunLog(lj, lj1, GetLangStr("NoticePicManager18", "文件"), "2"); if (!string.IsNullOrEmpty(lblname)) { logManager.InsertLogRunning(uName, GetLangStr("NoticePicManager42", "修改:") + lblname, nowIp, "1"); } else { Notice(GetLangStr("NoticePicManager22", "信息提示"), GetLangStr("NoticePicManager25", "未作任何修改!")); } TbutQueryClick(null, null); Window1.Hide(); } else { Notice(GetLangStr("NoticePicManager22", "信息提示"), GetLangStr("NoticePicManager26", "修改失败")); } Window1.Hide(); } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("NoticePicManager.aspx-Add_Fac", ex.Message + ";" + ex.StackTrace, "StoreDataBind has an exception"); } } else { } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("NoticePicManager.aspx-Add_Fac", ex.Message + ";" + ex.StackTrace, "StoreDataBind has an exception"); } }
public void DoNo() { Window1.Hide(); }
protected void Page_Load(object sender, EventArgs e) { if (!X.IsAjaxRequest) { JiaMiJieMi aeskey = new JiaMiJieMi(); string plocal = ""; if (License.Length < 32) // keypro { Rockey4ND rockey = new Rockey4ND(); hid = rockey.open(); if (hid != "") { string sSQL = "SELECT genst_desc FROM general_setup WHERE genst_ctg='License' AND genst_code='Plate'"; DataTable dt = db.Query(sSQL); if (dt.Rows.Count > 0) { plocal = dt.Rows[0]["genst_desc"].ToString(); } if (rockey.verify(hid, plocal)) { string totalbed = aeskey.AES_Decrypt(aeskey.Base64Decrypt(plocal.Substring(32, 32))); Window1.Title = "登入窗口: " + hid + "-" + totalbed; Window1.Show(); } else { Common._ErrorMsgShow("USB授权钥匙,认证编号不符合!"); } } else { Window1.Hide(); } rockey.close(); } else // softkey { try { //RegistryKey regkey = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Datacom\Product\DCS42"); //string[] n = regkey.GetValueNames(); //string hid = regkey.GetValue(n[0]).ToString(); string hid = License; if (hid.Length == 32) { hid = aeskey.AES_Decrypt(aeskey.Base64Decrypt(hid)); if (hid != "") { string sSQL = "SELECT genst_desc FROM general_setup WHERE genst_ctg='License' AND genst_code='Plate'"; DataTable dt = db.Query(sSQL); if (dt.Rows.Count > 0) { plocal = dt.Rows[0]["genst_desc"].ToString(); } string sid = aeskey.AES_Decrypt(aeskey.Base64Decrypt(plocal.Substring(0, 32))); if (hid == sid) { string totalbed = aeskey.AES_Decrypt(aeskey.Base64Decrypt(plocal.Substring(32, 32))); Window1.Title = "登入窗口: " + hid + "-" + totalbed; Window1.Show(); } else { Common._ErrorMsgShow("授权钥匙,认证编号不符合!"); } } else { Window1.Hide(); } } else { Common._ErrorMsgShow("授权钥匙,认证编号不符合!"); Window1.Hide(); } } catch (Exception ex) { Common._ErrorMsgShow(ex.Message.ToString()); } } if (!string.IsNullOrEmpty(Request.QueryString["url"])) { txtUrl.Text = Request.QueryString["url"]; } txtUsername.Focus(true, 100); } }