| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using Core.Mes.Client.Comm.Control;
- using Core.Mes.Client.Comm.Tool;
- using CoreFS.CA06;using Pur.Entity;
- using Infragistics.Win.UltraWinGrid;
- using Pur.configure;
- using Pur.Entity.configureEntity;
- using com.hnshituo.pur.vo;
- using Pur.Entity.pur_planEntity;
- namespace Pur.pur_plan
- {
- public partial class SummaryOK : FrmPmsBase
- {
- public SummaryOK()
- {
- InitializeComponent();
- }
- UltraGridRow uge = null;
- public SummaryOK(OpeBase ob, UltraGridRow ugr)
- {
- InitializeComponent();
- this.ob = ob;
- uge = ugr;
- }
- /// <summary>
- /// 界面加载
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void SummaryOK_Load(object sender, EventArgs e)
- {
- txt_taskId.Text = uge.Cells["taskId"].Value.ToString();
- txt_taskName.Text = uge.Cells["taskName"].Value.ToString();
- txt_negDate.Value = DateTime.Now;
- txt_mngOrgName.Text = UserInfo.GetDepartment();
- txt_buyerUsername.Text = UserInfo.GetUserName();
- }
- /// <summary>
- /// 科室弹窗
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- string mngOrgId = null;
- private void txt_mngOrgName_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- frmdepartment fdt = new frmdepartment(ob);
- fdt.ShowDialog();
- if (fdt.BuyerUnitDesc == null)
- return;
- txt_mngOrgName.Text = fdt.BuyerUnitDesc;
- mngOrgId = fdt.BuyerUnitCode;
- }
- /// <summary>
- /// 采购员弹窗
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- string buyerUsrId = null;
- private void txt_buyerUsername_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- SetectManByDept SmbD = new SetectManByDept(ob);
- SmbD.ShowDialog();
- if (SmbD.StrUserID == null)
- return;
- txt_buyerUsername.Text = SmbD.StrUserName;
- buyerUsrId = SmbD.StrUserID;
- }
- /// <summary>
- /// 菜单栏
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
- {
- switch (e.Tool.Key.ToString())
- {
- case "confirm":
- confirm_Summary();
- break;
- case "ESC":
- this.Close();
- break;
-
- }
- }
- /// <summary>
- /// 确认
- /// </summary>
- private void confirm_Summary()
- {
- try
- {
- PurTaskRecordEntity TkR = new PurTaskRecordEntity();
- TkR.Validflag = "1";
- TkR.Status = "2";
- TkR.CreateName = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
- TkR.CreateTime = DateTime.Now;
- TkR.CreateUserid = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserID();
- TkR.BuyerUserid = UserInfo.GetUserID();
- TkR.BuyerUsername = UserInfo.GetUserName();
- TkR.MngOrgId = UserInfo.GetDeptid();
- TkR.MngOrgName = UserInfo.GetDepartment();
- if (txt_negDate.Text=="")
- {
- MessageUtil.ShowTips("谈判日期不能为空!");
- txt_negDate.Focus();
- return;
- }
- TkR.NegDate = Convert.ToDateTime(txt_negDate.Value);
- TkR.TaskId = txt_taskId.Text.ToString().Trim();
- TkR.TaskName = txt_taskName.Text.ToString().Trim();
- if (String.IsNullOrEmpty(txt_procRecord.Text.ToString()))
- {
- MessageUtil.ShowTips("纪要过程不能为空!");
- txt_procRecord.Focus();
- return;
- }
- TkR.ProcRecord = txt_procRecord.Text.ToString().Trim();
- CoreResult crt = this.execute<CoreResult>("com.hnshituo.pur.purplan.service.TaskRecordService", "doInsert_Record", new object[] { TkR });
- if (crt.Resultcode != 0)
- {
- MessageUtil.ShowTips("采购纪要评审单生成失败!" + crt.Resultmsg);
- return;
- }
- else
- {
- MessageUtil.ShowTips("操作成功:生成采购纪要:" + crt.Resultmsg);
- this.Close();
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show("生成失败:" + ex);
- }
- }
- }
- }
|