private void btnshow_Click(object sender, EventArgs e) { FrmProject frmp = new FrmProject(); frmp.inidata(dtPro, dxrow); frmp.ShowDialog(); frmp.Dispose(); }
private void NewProjectToolStripMenuItem_Click(object sender, EventArgs e) { using (var s = new FrmProject()) { if (s.ShowDialog() == DialogResult.OK) { Project = s.Project; TempSetup(); tbStatusLabel.Text = "Project created"; } } Flash(tbStatusLabel, 500, Color.Green, 5); }
/// <summary> /// 表格行鼠标双击事件 /// </summary> /// <param name="sender">事件对象</param> /// <param name="e">事件参数</param> private void t_pgg_Bill_MouseDoubleClick(object sender, MouseButtonEventArgs e) { try { if (t_pgg_Bill.SelectedItem == null) { return; } XTreeNode myItem = t_tvw_Module.SelectedItem as XTreeNode; string myTag = string.Empty; string parentTag = string.Empty; if (myItem == null && m_MQuery != null) { myTag = m_MQuery.BillType; } else { myTag = myItem.Tag.ToString(); if (myItem.Parent != null) { parentTag = myItem.Parent.Tag.ToString(); } } if (myTag == "Q" || parentTag == "Q") { PT_B_Quotation myModel = (PT_B_Quotation)t_pgg_Bill.SelectedItem; FrmQuotation myForm = new FrmQuotation(); myForm.PTBQuotation = myModel; myForm.ShowDialog(); m_Entities.Dispose(); m_Entities = new ProjectTrackingEntities(); RefreshTreeNode(); } else { PT_B_Project myModel = (PT_B_Project)t_pgg_Bill.SelectedItem; FrmProject myForm = new FrmProject(); myForm.PTBProject = myModel; myForm.ShowDialog(); m_Entities.Dispose(); m_Entities = new ProjectTrackingEntities(); RefreshTreeNode(); } } catch (Exception ex) { XMessageBox.Exception(ex); } }
private void tsProjectSettings_Click(object sender, EventArgs e) { if (Project != null) { using (var s = new FrmProject(Project)) { if (s.ShowDialog() == DialogResult.OK) { Project = s.Project; tbStatusLabel.Text = "Project Settings Changed"; } } Flash(tbStatusLabel, 500, Color.Green, 3); } }
/// <summary> /// 生成项目单 /// </summary> /// <param name="sender">事件对象</param> /// <param name="e">事件参数</param> private void t_tsb_CreateProject_Click(object sender, RoutedEventArgs e) { try { if (m_IsModify || t_txt_QuotationNo.Text == "新单") { XMessageBox.Enter("当前单据尚未保存,请保存后再操作!", this); return; } m_IsModify = false; this.Visibility = Visibility.Hidden; PT_B_Project myModel = new PT_B_Project(); myModel.Project_Id = Guid.NewGuid().ToString("N"); myModel.Quotation_No = PTBQuotation.Quotation_No; myModel.Quotation_Date = PTBQuotation.Quotation_Date; myModel.Follow_Man = PTBQuotation.Follow_Man; myModel.Product_Model = PTBQuotation.Product_Model; myModel.Project_Name = PTBQuotation.Project_Name; myModel.Price = PTBQuotation.Price; myModel.Is_Tax = PTBQuotation.Is_Tax; myModel.Project_Type = PTBQuotation.Quotation_Type; myModel.Cycle_Time = PTBQuotation.Cycle_Time; myModel.Company_Name = PTBQuotation.Company_Name; myModel.Company_Address = PTBQuotation.Company_Address; myModel.Contact_Man = PTBQuotation.Contact_Man; myModel.Tel = PTBQuotation.Tel; myModel.Email = PTBQuotation.Email; myModel.Fax = PTBQuotation.Fax; myModel.Remark = PTBQuotation.Remark; myModel.Oper_Time = DateTime.Now; myModel.Account_Receivable = PTBQuotation.Price; myModel.Profits = PTBQuotation.Price; FrmProject myForm = new FrmProject(); myForm.PTBProject = myModel; myForm.ShowDialog(); this.Close(); } catch (Exception ex) { XMessageBox.Exception(ex); } }
/// <summary> /// 项目单窗口双击事件 /// </summary> /// <param name="sender">事件对象</param> /// <param name="e">事件参数</param> private void t_dge_Project_MouseDoubleClick(object sender, MouseButtonEventArgs e) { try { if (t_dge_Project.Items.Count == 0) { return; } this.Visibility = Visibility.Hidden; PT_B_Project myModel = (PT_B_Project)t_dge_Project.SelectedItem; FrmProject myForm = new FrmProject(); myForm.PTBProject = myModel; myForm.ShowDialog(); this.Close(); } catch (Exception ex) { XMessageBox.Exception(ex); } }
private void ToolStripMenuItem_Project_Click_1(object sender, EventArgs e) { FrmProject project = new FrmProject(); project.ShowDialog(); }