private void pictureBox9_DoubleClick(object sender, EventArgs e) { WindowAdd frm1 = (WindowAdd)this.Owner; frm1.ChooseID = pictureBox9.Tag.ToString(); frm1.pic = pic; this.DialogResult = DialogResult.OK; }
protected void Page_Load(object sender, EventArgs e) { page = ViewState["page"] == null ? 0 : (int)ViewState["page"]; btnSelect_All.Text = "全选"; if (!IsPostBack) { //添加 btnAdd.OnClientClick = WindowAdd.GetShowReference("Add_WorkExperience.aspx"); BindData(); btnDelete.Enabled = false; } }
protected void Page_Load(object sender, EventArgs e) { page = ViewState["page"] == null ? 0 : (int)ViewState["page"]; btnSelect_All.Text = "全选"; if (!IsPostBack) { //添加数据 btnAdd.OnClientClick = WindowAdd.GetShowReference("Add_BasicCode.aspx"); BindData(); btnDelete.Enabled = false; DropDownListCategoryName.Reset(); InitDropListDropDownListCategoryName(); } }
public Customer AddCustomer() { var vm = new WindowAddViewModel { Model = new Customer(), OkCommand = new RelayCommand(ExecuteOkCommand), CancelCommand = new RelayCommand(ExecuteCancelCommand) }; mView = new WindowAdd { DataContext = vm }; var result = mView.ShowDialog() ?? false; return(result ? vm.Model : null); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { page = ViewState["page"] == null ? 0 : (int)ViewState["page"]; btnSelect_All.Text = "全选"; //添加 btnAdd.OnClientClick = WindowAdd.GetShowReference("Add_PartTimeJob.aspx"); //删除数据 //btnDelete.OnClientClick = GridSocialPartTime.GetNoSelectionAlertReference("请至少选择一项!"); //btnDelete.ConfirmText = String.Format("你确定要删除该行数据吗?", GridSocialPartTime.GetSelectedCellReference()); //修改数据 Btnchange.OnClientClick = GridSocialPartTime.GetNoSelectionAlertReference("请至少选择一项!"); BindData(); btnDelete.Enabled = false; DropDownListYearandLevel.Enabled = false; TBNameandAgency.Enabled = false; } }
public Employee AddEmployee() { mView = new WindowAdd(); WindowAddViewModel winAdM = new WindowAddViewModel(); winAdM.Model = new Employee(); winAdM.OkCommand = new RelayCommand(ExecuteOkCommand); winAdM.CancelCommand = new RelayCommand(ExecuteCancelCommand); mView.DataContext = winAdM; if (mView.ShowDialog() == true) { return(winAdM.Model); } else { return(null); } }
public void clickButtonAdd(object sender, RoutedEventArgs e) { WindowAdd form = new WindowAdd(); form.Show(); }