protected void update_Click(object sender, AjaxEventArgs e) { RowSelectionModel sm = this.mpgList.SelectionModel.Primary as RowSelectionModel; if (sm != null && sm.SelectedRows.Count == 1) { WorkflowDefinition wd = RuntimeContextExamples.GetRuntimeContext().PersistenceService.FindWorkflowDefinitionById(sm.SelectedRows[0].RecordID); if (wd != null) { this.state.SetValue(wd.State.ToString()); this.HProcessId.SetValue(wd.Id); WorkflowEdit.SetTitle("修改流程=" + wd.ProcessId); WorkflowEdit.Show(); } } else { Ext.Msg.Show(new MessageBox.Config { Buttons = MessageBox.Button.OK, Icon = MessageBox.Icon.INFO, Title = "Success", Message = "请先选择修改的流程文件." }); } }
/// <summary> /// 更新地点信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void UpdateLocationData(object sender, DirectEventArgs e) { try { Hashtable hs = new Hashtable(); RowSelectionModel sm = this.GridLocation.SelectionModel.Primary as RowSelectionModel; string Id = sm.SelectedRow.RecordID; hs.Add("location_id", Id); hs.Add("location_name", TxtLocationName.Text); hs.Add("location_section", TxtLocationSection.Text); hs.Add("location_road", TxtLocationRoad.Text); hs.Add("location_kilometer", TxtLocationKiloMeter.Text); hs.Add("location_police", TxtLocationPolice.Text); hs.Add("areaid", TxtAreaID.Text); hs.Add("location_device", TxtLocationDevice.Text); if (CmbDepartment.SelectedIndex != -1) { hs.Add("departid", CmbDepartment.Value); } if (settingManager.UpdatePeccLocationInfo(hs) > 0) { Notice(GetLangStr("LocationUpload21", "信息提示"), GetLangStr("LocationUpload23", "更新成功")); } GetLocationData(); } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("LocationUpload.aspx-UpdateLocationData", ex.Message + ";" + ex.StackTrace, "UpdateLocationData has an exception"); } }
public void SWLoad()//加载明细信息 { RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel; BasePanel.Disabled = !SetSWbase(sm.SelectedRows[0].RecordID.Trim()); CFPanel.Collapsed = true; }
public void DoYes() { try { RowSelectionModel sm = this.GridPanel1.GetSelectionModel() as RowSelectionModel; foreach (SelectedRow row in sm.SelectedRows) { //Step 1 :Getting the id of the selected record: it maybe string int id = int.Parse(row.RecordID); //Step 2 : removing the record from the store //To do add code here //Step 3 : remove the record from the store Store1.Remove(id); } //Showing successful notification Notification.Show(new NotificationConfig { Title = Resources.Common.Notification, Icon = Icon.Information, Html = Resources.Common.ManyRecordDeletedSucc }); } catch (Exception ex) { //Alert in case of any failure X.MessageBox.ButtonText.Ok = Resources.Common.Ok; X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorDeletingRecord).Show(); } }
protected void SearchBLDblClick(object sender, AjaxEventArgs e) { RowSelectionModel sm = gpSearchBL.SelectionModel.Primary as RowSelectionModel; if (sm.SelectedRows.Count > 0) { //var yh = from hd in dc.Gethazardusing // where hd.HNumber == sm.SelectedRow.RecordID && hd.Deptnumber == SessionBox.GetUserSession().DeptNumber // select new // { // yhNumber = hd.HNumber, // yhContent = hd.SwBm // }; //修改多列显示 var yh = from hd in dc.Gethazardusing where hd.HNumber == sm.SelectedRow.RecordID && hd.Deptnumber == SessionBox.GetUserSession().DeptNumber select new { yhNumber = hd.HNumber, yhContent = hd.HBm, hd.Gzrwname, hd.Gxname }; yhStore.DataSource = yh; yhStore.DataBind(); cbbSWcontent.SelectedItem.Value = sm.SelectedRow.RecordID; SearchBLWindow.Hide(); Ext.DoScript("#{cbbSWcontent}.triggers[0].show();"); SelectLoad(); } }
public void BanAddPerson() { RowSelectionModel sm = gpPer.SelectionModel.Primary as RowSelectionModel; if (sm.SelectedRows.Count > 0) { foreach (var r in sm.SelectedRows) { DBSCMDataContext db = new DBSCMDataContext(); var sw = db.Nswinput.First(p => p.Swpersonid == r.RecordID && p.Islearn == 1); Swexamine se = new Swexamine { Swid = sw.Id, Stime = dfInban.SelectedDate, Isfinish = 0, Result = " " }; db.Swexamine.InsertOnSubmit(se); sw.Islearn = 2; db.SubmitChanges(); } Ext.Msg.Alert("提示", "进班成功,共添加" + sm.SelectedRows.Count.ToString() + "人").Show(); SelectedStoreLoad(); sm.SelectedRows.Clear(); sm.UpdateSelection(); LearnStoreLoad(); btn_detail.Disabled = true; btnsw.Disabled = true; Button1.Disabled = true; } }
/// <summary> /// 删除角色 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ButRoleDelete_Click(object sender, DirectEventArgs e) { try { RowSelectionModel sm = this.GridRole.SelectionModel.Primary as RowSelectionModel; if (sm.SelectedRow != null) { string Id = sm.SelectedRow.RecordID; DataRow[] dr = dtname.Select("col1='" + Id + "'"); string yhms = dr[0]["col2"].ToString(); X.Msg.Confirm(GetLangStr("RoleManager18", "信息"), GetLangStr("RoleManager19", "确认要删除[" + yhms + GetLangStr("RoleManager50", "]吗?")), new MessageBoxButtonsConfig { Yes = new MessageBoxButtonConfig { Handler = "RoleManager.DoYes()", Text = GetLangStr("RoleManager20", "是") }, No = new MessageBoxButtonConfig { Handler = "RoleManager.DoNo()", Text = GetLangStr("RoleManager21", "否") } }).Show(); } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("RoleManager.aspx-ButRoleDelete_Click", ex.Message + ";" + ex.StackTrace, "ButRoleDelete_Click has an exception"); } }
public void DeletePecType() { try { RowSelectionModel sm = this.GridPecType.SelectionModel.Primary as RowSelectionModel; if (sm.SelectedRow != null) { string Id = sm.SelectedRow.RecordID; X.Msg.Confirm(GetLangStr("PeccancyType29", "信息"), GetLangStr("PeccancyType30", "确认要删除这条记录吗?"), new MessageBoxButtonsConfig { Yes = new MessageBoxButtonConfig { Handler = "PeccancyType.DoYes()", Text = GetLangStr("PeccancyType32", "是") }, No = new MessageBoxButtonConfig { Handler = "PeccancyType.DoNo()", Text = GetLangStr("PeccancyType33", "否") } }).Show(); } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("PeccancyType.aspx-DeletePecType", ex.Message + ";" + ex.StackTrace, "DeletePecType has an exception"); } }
public void DoYesLimit() { try { RowSelectionModel sm = this.GridLane.SelectionModel.Primary as RowSelectionModel; string Id = sm.SelectedRow.RecordID; kkmcId = Id; Hashtable hs = new Hashtable(); hs.Add("id", Id); if (tgsPproperty.DeleteLaneInfo(hs) > 0) { DataRow[] dr = dtKkmc.Select("col0='" + kkmcId + "'"); if (dr.Length > 0) { kkmc = dr[0]["col2"].ToString(); } Notice(GetLangStr("TGSLimitSpeed36", "限速设置"), GetLangStr("TGSLimitSpeed31", "删除成功")); logManager.InsertLogRunning(uName, "删除:[" + kkmc + "]监测点", nowIp, "3"); GetLimitData(HideStation.Value as string); sm.ClearSelections(); sm.UpdateSelection(); } else { Notice(GetLangStr("TGSLimitSpeed19", GetLangStr("TGSLimitSpeed36", "限速设置")), GetLangStr("TGSLimitSpeed32", "删除失败")); } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("TGSLimitSpeed.aspx-DoYesLimit", ex.Message + ";" + ex.StackTrace, "DoYesLimit has an exception"); } }
private bool SetSWbase(string ID)//加载事故基本信息 { try { RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel; var sg = dc.Accidentcase.First(p => p.Id == decimal.Parse(ID)); if (sm.SelectedRows.Count > 0) { TextField1.Text = sg.Accidentname; sgdj.SelectedItem.Value = sg.AccidentLevelid.ToString(); sglx.SelectedItem.Value = sg.AccidentTypeid.ToString(); NumberField1.Text = sg.Deathnumber.ToString(); NumberField2.Text = sg.Zsnumber.ToString(); NumberField3.Text = sg.Qsnumber.ToString(); NumberField4.Text = sg.ZjLoss.ToString(); NumberField5.Text = sg.JjLoss.ToString(); sf.SelectedItem.Value = sg.Provinces.ToString(); TextField2.Text = sg.Orename; kjlx.SelectedItem.Value = sg.OreTypeid.ToString(); wsdj.SelectedItem.Value = sg.WsLevelid.ToString(); jt.SelectedItem.Value = sg.Jtgs.ToString(); Happentime.Value = sg.Happendate; sgfenxi.Text = sg.Sgfx; sgjg.Text = sg.Sgjg; } return(true); } catch { return(false); } }
public void DoConfirmLimit() { try { RowSelectionModel sm = this.GridLane.SelectionModel.Primary as RowSelectionModel; if (sm.SelectedRow != null) { string Id = sm.SelectedRow.RecordID; X.Msg.Confirm(GetLangStr("TGSLimitSpeed26", "信息"), GetLangStr("TGSLimitSpeed27", "确认要删除这个监测点吗?"), new MessageBoxButtonsConfig { Yes = new MessageBoxButtonConfig { Handler = "TGSLimitSpeed.DoYesLimit()", Text = GetLangStr("TGSLimitSpeed28", "是") }, No = new MessageBoxButtonConfig { Handler = "TGSLimitSpeed.DoNo()", Text = GetLangStr("TGSLimitSpeed29", "否") } }).Show(); } else { Notice(GetLangStr("TGSLimitSpeed36", "限速设置"), GetLangStr("TGSLimitSpeed30", "请选中要删除的数据行")); } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("TGSLimitSpeed.aspx-DoConfirmLimit", ex.Message + ";" + ex.StackTrace, "DoConfirmLimit has an exception"); } }
//删除数据 protected void BtnDel_Click(object sender, DirectEventArgs e) { int Success = 0, Failed = 0; RowSelectionModel sm = CL_Grid.SelectionModel.Primary as RowSelectionModel; foreach (SelectedRow row in sm.SelectedRows) { Y_CareLabel _Y_CareLabel = new Y_CareLabel(); _Y_CareLabel = WMSFactory.Y_CareLabel.FindById(row.RecordID); if (WMSFactory.Y_CareLabel.Del(_Y_CareLabel)) { if (File.Exists(Server.MapPath("XMimg/" + _Y_CareLabel.LbUrl))) { File.Delete(Server.MapPath("XMimg/" + _Y_CareLabel.LbUrl)); } //删除所有关联的图片 WMSFactory.Y_StyleCareLabel.DelByConditions("LbId=" + _Y_CareLabel.Id); Success++; } else { Failed++; } } CL_Grid.Reload(); if (Failed > 0) { MsgBox.MessageShow("删除操作完成,成功" + Success.ToString() + "条,失败" + Failed.ToString() + "条!", "OK"); } else { MsgBox.NotifiShow("删除操作完成,成功" + Success.ToString() + "条,失败" + Failed.ToString() + "条!", "OK"); } }
//删除我的洗唛 protected void BtnDelMyXM_Click(object sender, DirectEventArgs e) { int Success = 0, Failed = 0; RowSelectionModel sm = Y_CareLabel_Grid.SelectionModel.Primary as RowSelectionModel; foreach (SelectedRow row in sm.SelectedRows) { Y_StyleCareLabel _Y_CareLabel = new Y_StyleCareLabel(); _Y_CareLabel.Id = int.Parse(row.RecordID); if (WMSFactory.Y_StyleCareLabel.Del(_Y_CareLabel)) { Success++; } else { Failed++; } } Y_CareLabel_Grid.Reload(); if (Failed > 0) { MsgBox.MessageShow("删除操作完成,成功" + Success.ToString() + "条,失败" + Failed.ToString() + "条!", "OK"); } else { MsgBox.NotifiShow("删除操作完成,成功" + Success.ToString() + "条,失败" + Failed.ToString() + "条!", "OK"); } }
public void btnCancel_click() { if (string.IsNullOrEmpty(txtRowID.Text)) { X.Msg.Alert("status", " Please choose to delete lines", new JFunction() { Fn = "textResult" }).Show(); } else { bool b = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_Report_SP", new List <IFields>() { dal.CreateIFields() .Append("Option", "Delete") .Append("rp_ROWID", txtRowID.Text) .Append("rp_Modifier", FSecurityHelper.CurrentUserDataGET()[0]) }).Update(); if (b) { cmbStat.Text = ""; txtRowID.Text = ""; GridBind(""); RowSelectionModel row = this.GridPanel.GetSelectionModel() as RowSelectionModel; row.SelectFirstRow(); } else { X.Msg.Alert("status", " Delete failed ", new JFunction() { Fn = "textResult" }).Show(); } } }
public void DoYes() { try { RowSelectionModel sm = this.GridRole.SelectionModel.Primary as RowSelectionModel; sm.SelectedRow.ToBuilder(); Hashtable hs = new Hashtable(); string Id = sm.SelectedRow.RecordID; int idx = sm.SelectedRow.RowIndex; hs.Add("rolecode", Id); if (settingManager.DeleteSerRoleInfo(hs) > 0) { Notice(GetLangStr("RoleManager28", "角色删除"), GetLangStr("RoleManager29", "删除成功")); DataRow[] dr = dtname.Select("col1='" + Id + "'"); yhm = dr[0]["col2"].ToString(); logManager.InsertLogRunning(uName, GetLangStr("RoleManager30", "删除:[") + yhm + GetLangStr("RoleManager31", "]用户"), nowIp, "3"); RoleDataBind("1=1"); } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("RoleManager.aspx-DoYes", ex.Message + ";" + ex.StackTrace, "DoYes has an exception"); } }
public void DoConfirm() { try { RowSelectionModel sm = this.GridDeviceManager.SelectionModel.Primary as RowSelectionModel; if (sm.SelectedRow != null) { string Id = sm.SelectedRow.RecordID; X.Msg.Confirm(GetLangStr("DeviceManager83", "信息"), GetLangStr("DeviceManager84", "这样会删除设备信息,确认要删除这台设备吗?"), new MessageBoxButtonsConfig { Yes = new MessageBoxButtonConfig { Handler = "DeviceManager.DoYes()", Text = GetLangStr("DeviceManager85", "是") }, No = new MessageBoxButtonConfig { Handler = "DeviceManager.DoNo()", Text = GetLangStr("DeviceManager86", "否") } }).Show(); } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("DeviceManager.aspx-DoConfirm", ex.Message + ";" + ex.StackTrace, "DoConfirm has an exception"); } }
public void DoDel() { RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel; if (sm.SelectedRows.Count > 0) { var gs = dc.Accidentcase.First(p => p.Id == decimal.Parse(sm.SelectedRow.RecordID.Trim())); dc.Accidentcase.DeleteOnSubmit(gs); dc.SubmitChanges(); Ext.Msg.Alert("提示", "删除成功!").Show(); btnEdit.Disabled = true; btnDelete.Disabled = true; Gridload(); sgName.Text = ""; sgdj.SelectedItem.Value = ""; sglx.SelectedItem.Value = ""; swNumber.Text = ""; zsNumber.Text = ""; qsNumber.Text = ""; zjjjss.Text = ""; jjjjss.Text = ""; sf.SelectedItem.Value = ""; kjName.Text = ""; kjlx.SelectedItem.Value = ""; wsdj.SelectedItem.Value = ""; jt.SelectedItem.Value = ""; } }
protected void RowClick(object sender, AjaxEventArgs e)//流程处理 { RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel; if (sm.SelectedRows.Count > 0) { var sw = dc.Swinput.First(p => p.Id == decimal.Parse(sm.SelectedRow.RecordID.Trim())); try { if (sw.Isend.Value == 1) { cbbplace.SelectedItem.Value = ""; cbbSWcontent.SelectedItem.Value = ""; cbbSwperson.SelectedItem.Value = ""; btnEdit.Disabled = true; btnDelete.Disabled = true; TextArea2.Text = ""; TextArea1.Text = ""; return; } else { detailload(); SelectLoad(); } } catch { detailload(); SelectLoad(); } } }
public void btnAddSave_Click() { btnSave_Click(); txtRowID.Text = null; txtReport.Text = null; txtName.Text = null; txtTitle.Text = null; txtRptHeader.Text = null; txtRptFooter.Text = null; txtPageFooter.Text = null; txtPageHeader.Text = null; txtPageFooter.Text = null; txtCompanyEN.Text = null; txtCompanyLocal.Text = null; txtAddressEN.Text = null; txtAddressLocal.Text = null; txtTelFax.Text = null; chkCompnayEN.Checked = false; chkCompanyLocal.Checked = false; chkAddressEN.Checked = false; chkAddressLocal.Checked = false; chkTelFax.Checked = false; txtTop.Clear(); txtBottom.Clear(); txtLeft.Clear(); txtRight.Clear(); RowSelectionModel row = this.GridPanel.GetSelectionModel() as RowSelectionModel; row.ClearSelections(); }
public void ContentIn() { //传参进入危险源辨识页面 RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel; string url = string.Format("~/HazardManage/Inputext.aspx?TempId={0}", sm.SelectedRow.RecordID); Response.Redirect(url); }
protected void CompanyNameSelect_AfterEdit(object sender, DirectEventArgs e) { RowSelectionModel sm = this.GridPanelOther.SelectionModel.Primary as RowSelectionModel; int index = sm.SelectedRow.RowIndex; var data = JSON.Deserialize <Other>(e.ExtraParams["CompanyNameSelect"]); this.StoreOther.UpdateRecordField(index, "", data.CompanyCode); }
protected void btnDelete_Click(object sender, DirectEventArgs e) { SpmMaster _Master = (SpmMaster)Master; SqlDB sdb = new SqlDB(DataPara.GetDbConnectionString("NPI_REPORT")); string subdoc = string.Empty; string filename = string.Empty; string filetype = string.Empty; string CaseID = _Master.IFormURLPara.CaseId.ToString(); RowSelectionModel sm = grdAttachment.SelectionModel.Primary as RowSelectionModel; if (sm.SelectedRows.Count <= 0) { Alert("請勾選需刪除的信息"); return; } string json = e.ExtraParams["Values"]; Dictionary <string, string>[] list = JSON.Deserialize <Dictionary <string, string>[]>(json); StringBuilder ErrMsg = new StringBuilder(); foreach (Dictionary <string, string> row in list) { subdoc = row["SUB_DOC_NO"].ToString(); filename = row["FILE_NAME"].ToString(); filetype = row["FILE_TYPE"].ToString(); try { string sql = "DELETE FROM TB_NPI_APP_ATTACHFILE WHERE SUB_DOC_NO=@subdoc" + " and FILE_TYPE=@filetype and FILE_NAME=@fileName"; opc.Clear(); opc.Add(DataPara.CreateDataParameter("@subdoc", DbType.String, subdoc)); opc.Add(DataPara.CreateDataParameter("@filetype", DbType.String, filetype)); opc.Add(DataPara.CreateDataParameter("@fileName", DbType.String, filename)); sdb.TransactionExecuteNonQuery(sql, opc); string sub_docNoPath = Server.MapPath("~/Attachment/" + CaseID + "/" + filetype + "/" + filename); bool IsSubDocNoExist = Directory.Exists(sub_docNoPath); if (IsSubDocNoExist) { DeleteExistFiles(sub_docNoPath); } } catch (Exception ex) { ErrMsg.Append(string.Format("類別:{0},文件名稱:{1} 刪除作業失敗!ErrMsg:{2}<BR/>", filetype, filename, ex.Message)); } } if (ErrMsg.Length > 0) { Alert(ErrMsg.ToString()); } else { Alert("刪除作業成功!"); BindAttachmentList(CaseID); } }
public void btnEdit_Click() { RowSelectionModel sm = gpEdit.SelectionModel.Primary as RowSelectionModel; if (sm.SelectedRows.Count > 0) { Ext.DoScript("#{Window1}.load('EditAccess_new.aspx?type=edit&Rid=" + sm.SelectedRow.RecordID + "');#{Window1}.show();"); } }
/// <summary> /// 查询方法 /// </summary> /// <param name="start">开始时间</param> /// <param name="end">结束时间</param> /// <param name="cllx">车辆类型</param> /// <param name="hphm">号牌号码</param> /// <param name="gssj">更新时间</param> /// <param name="txkk">卡口</param> private void query(string start, string end, string cllx, string clxh, string hphm, string clpp, string csys, List <string> listkkid, int page) { try { int startrow = 0, len = 15, endrow = 15; startrow = startrow + len * page; endrow = endrow + len * page; string xml = "", rsxml = ""; Dt_passcar.Clear(); Dt_passcar = GetData(); string kkid = ""; foreach (string id in listkkid) { kkid += (kkid == "" ? "" : ",") + id; } xml = getxml(startrow, endrow, start, end, cllx, clxh, clpp, csys, hphm, kkid); try { rsxml = client.GetPassCarInfo(xml); } catch (Exception ex) { Notice("提示", "接口服务报错!"); ILog.WriteErrorLog(ex.Message); logManager.InsertLogError("CarStrandQuery.aspx-query", ex.Message + ";" + ex.StackTrace, "query has an exception"); } Dt_passcar.Clear(); Dt_passcar = GetData(); //大数据查询接口 if (rsxml != "" && getlenxml(rsxml) > 0) { CXmlToDataTable(rsxml); if (Dt_passcar != null && Dt_passcar.Rows.Count > 0) { this.StoreInfo.DataSource = Dt_passcar; this.StoreInfo.DataBind(); } labpage.Text = "共" + totalinfo + "条记录,当前" + (page + 1).ToString() + "页,共" + totalpage.Value.ToString() + "页"; } else { this.StoreInfo.RemoveAll(); this.StoreInfo.DataBind(); labpage.Text = "共0条记录,当前0页,共0页"; Notice("提示", "无数据!"); } RowSelectionModel sm = this.GridStation.SelectionModel.Primary as RowSelectionModel; sm.SelectedRows.Clear(); sm.UpdateSelection(); } catch (Exception ex) { ILog.WriteErrorLog(ex.Message); logManager.InsertLogError("CarStrandQuery.aspx-query", ex.Message + ";" + ex.StackTrace, "query has an exception"); } }
protected void btnDelete_Click(object sender, DirectEventArgs e) { string Category = string.Empty; string Dept = string.Empty; string ename = string.Empty; string Id = string.Empty; RowSelectionModel sm = grdInfo.SelectionModel.Primary as RowSelectionModel; if (sm.SelectedRows.Count <= 0) { Alert("請勾選需刪除的信息!"); return; } string json = e.ExtraParams["Values"]; Dictionary <string, string>[] sele = JSON.Deserialize <Dictionary <string, string>[]>(json); StringBuilder msg = new StringBuilder(); foreach (Dictionary <string, string> row in sele) { Category = row["CATEGORY"].ToString(); Dept = row["DEPT"].ToString(); ename = row["ENAME"].ToString(); Id = row["ID"].ToString(); NPIMgmt oMgmt = new NPIMgmt(lblSite.Text, lblBu.Text); NPI_Standard oStandard = oMgmt.InitialLeaveMgmt(); Model_NPI_MEMBER oModel = new Model_NPI_MEMBER(); oModel._ID = Id; try { Dictionary <string, object> result = oStandard.RecordOperation_NPIMember(oModel, Status_Operation.DELETE); if ((bool)result["Result"]) { Alert("删除團隊成員成功!"); BindMemberList(oModel); } else { Alert((string)result["ErrMsg"].ToString()); } } catch (Exception ex) { msg.Append(string.Format("類別:{0},部門:{1},英文名稱:{2} 刪除作業失敗!ErrMsg:{3}<BR/>", Category, Dept, ename, ex.Message)); } } if (msg.Length > 0) { Alert(msg.ToString()); } else { Alert(string.Format("刪除作業成功!")); } }
/// <summary> /// 查询数据绑定 /// </summary> void DataBinder() { int voy_vessel = -1; try { voy_vessel = Convert.ToInt32(cmbVessel.SelectedItem.Value); } catch { cmbVessel.Value = ""; cmbVessel.Text = ""; } DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanImport_Voyage_SP", new List <IFields>() { dal.CreateIFields(). Append("Option", "list"). Append("voy_Stat", FSecurityHelper.CurrentUserDataGET()[12]). Append("voy_Vessel", voy_vessel) }).GetList(); if (ds == null || ds.Tables[0].Rows.Count == 0) { txtVoyageID.Text = "0"; //labCarrierCode.Text = ""; txtVoyage.Text = ""; txtCFS.RawText = ""; txtCY.RawText = ""; txtETA.RawText = ""; txtETD.RawText = ""; txtOnboard.RawText = ""; cmbPOD.setValue(""); cmbPOL.setValue(""); gridVoyageRoute.GetStore().RemoveAll(); } if (ds != null && ds.Tables[1].Rows.Count > 0) { labCarrierCode.Text = ds.Tables[1].Rows[0]["Carrier"].ToString(); } storeVoyage.DataSource = ds; storeVoyage.DataBind(); if ((string.IsNullOrEmpty(Request["vessel"]) && Request["vesselID"] == null) && refresh) { RowSelectionModel sm = gridVoyage.GetSelectionModel() as RowSelectionModel; sm.SelectRow(0); sm.SelectedRows.Add(new SelectedRow(0)); } else if (Request["vesselID"] != null && cmbVessel.SelectedItem.Value != Request["vesselID"].ToString() && refresh) { RowSelectionModel sm = gridVoyage.GetSelectionModel() as RowSelectionModel; sm.SelectRow(0); sm.SelectedRows.Add(new SelectedRow(0)); } }
public void SWpublish() //已改 { //保存三违信息确认的数据库信息 RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel; //DBSCMDataContext dc = new DBSCMDataContext(); var SWcheck = dc.Nswinput.Where(p => p.Id == Convert.ToInt32(sm.SelectedRows[0].RecordID.Trim())); foreach (var r in SWcheck) { //r.ID = Convert.ToInt32(sm.SelectedRows[0].RecordID.Trim()); r.Fine = lbl_Fine.Text.Trim() == "" ? 0 : Convert.ToDecimal(lbl_Fine.Text.Trim()); r.Ispublic = Radio3.Checked ? 1 : 0; r.Isadministrativepenalty = Radio1.Checked ? 1 : 0; r.Isend = 1; r.Islearn = Radio5.Checked ? 1 : 0; try { dc.SubmitChanges(); } catch (Exception er) { Ext.Msg.Alert("", er.ToString()).Show(); } } //短信提醒三违人员 if (ckb_IsSms.Checked == true) { ////获取发送者账号信息 //string user = ""; //user = SessionBox.GetUserSession().LoginName; ////获取手机号码 //var per = dc.Person.Where(p => p.Name == tf_name.Text.Trim()); //string tel = ""; //foreach (var r in per) //{ // tel = r.Tel.Trim(); //} ////获取发送的短信内容 //string content = ""; //if (ta_smsText.Text == "") //{ // content = "祁南矿干部走动式巡查管理系统提示您:您有一条三违信息已经确认!"; //} //else //{ // content = ta_smsText.Text.Trim(); //} ////发送短信 //Sms sms = new Sms(); //sms.SendSms(GhtnTech.Utility.ExtensionHelper.SmsType.HiddenTroubleTips, user, content, tel); } Ext.Msg.Alert("提示", "该三违信息已确认!").Show(); ckb_IsSms.Checked = false; storeload(); Window2.Hide(); }
public void DetailLoad(int type) { RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel; if (sm.SelectedRows.Count > 0) { var swe = (from se in dc.Swexamine from sw in dc.Nswinput from sb in dc.Swbase where se.Swid == sw.Id && sw.Swid == sb.Swid && se.Swid == Convert.ToInt32(sm.SelectedRows[0].RecordID.Trim()) select new { se.Swid, se.Result, sb.Levelid, sw.Maindeptid }).First(); var data = from l in dc.Swlearn join r in dc.SwexamineDetail.Where(p => p.Swid == swe.Swid) on l.Lid equals r.Lid into gg from g in gg.DefaultIfEmpty() where l.Levelid == swe.Levelid && l.Deptnumber == swe.Maindeptid && l.Nstatus == 1 select new { l.Lid, l.Lname, g.Remark, isCheck = g.Swid != null }; LearnStore.DataSource = data; LearnStore.DataBind(); try { tfResult.Text = swe.Result; } catch { tfResult.Text = ""; } if (type == 1) { btnSave.Show(); btnSure.Show(); } else if (type == 2) { btnSave.Show(); btnSure.Show(); } else { btnSave.Hide(); btnSure.Hide(); } ActionWindow.Show(); } }
protected void Button3_Click(object sender, AjaxEventArgs e) { RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel; if (sm.SelectedRows.Count > 0) { Window1.Show(); detailPlan(sm.SelectedRows[0].RecordID.Trim()); } }
public void ClearBL() { RowSelectionModel sm = GridPanel3.SelectionModel.Primary as RowSelectionModel; var yh = dc.Yhbase.First(p => p.Yhid == decimal.Parse(sm.SelectedRow.RecordID)); cbbSbsdy.SelectedItem.Value = yh.Typeid.ToString(); cbbSfxlx.SelectedItem.Value = null; cbbSgzrw.SelectedItem.Value = null; tfSyhms.Text = ""; }