Ejemplo n.º 1
1
        public SUUpdateAlert(Window window, SUHost host, SUAppcastItem item)
            : base(window)
        {
            Window.TaskbarItemInfo = new System.Windows.Shell.TaskbarItemInfo();
            Window.Closing += WindowShouldClose;
            Window.Icon = host.Icon;
            Window.Topmost = true;

            status = WindowStatus.WaitingForInitialAction;

            mainViewController = new SUUpdateAlertWindowViewController(new SUUpdateAlertWindowView());
            ViewController = mainViewController;

            buttons = new SUUpdateAlertActionButtonsViewController(new SUUpdateAlertActionButtonsView());
            buttons.InstallButton.Click += DownloadButtonClicked;
            buttons.RemindLaterButton.Click += RemindLaterButtonClicked;
            buttons.SkipVersionButton.Click += SkipVersionButtonClicked;

            downloadingViewController = new SUUpdateAlertDownloadProgressViewController(new SUUpdateAlertDownloadProgressView());
            downloadingViewController.CancelButton.Click += CancelDownloadClicked;

            indeterminateViewController = new SUUpdateAlertIndeterminateProgressViewController(new SUUpdateAlertIndeterminateProgressView());
            readyToInstallViewController = new SUUpdateAlertReadyToInstallViewController(new SUUpdateAlertReadyToInstallView());

            readyToInstallViewController.InstallButton.Click += InstallButtonClicked;

            mainViewController.ActionViewController = buttons;
            mainViewController.Host = host;
            mainViewController.Item = item;
        }
        public UCReportedLossBillAddOrEdit(WindowStatus state, string LossId, UCReportedLossBillManager UCLosManager)
        {
            InitializeComponent();
            DTPickorder_date.Value = DateTime.Now.ToShortDateString();//获取当前系统时间
            this.UCLossBM = UCLosManager;//获取报损单管理类
            this.status = state;//获取操作状态
            this.StockLossId = LossId;//报损单ID
            base.SaveEvent += new ClickHandler(UCReportedLossBillAddOrEdit_SaveEvent);//保存
            base.SubmitEvent += new ClickHandler(UCReportedLossBillAddOrEdit_SubmitEvent);//提交
            base.ImportEvent += new ClickHandler(UCReportedLossBillAddOrEdit_ImportEvent);//导入
            //设置列表的可编辑状态
            gvPartsMsgList.ReadOnly = false;
            foreach (DataGridViewColumn dgCol in gvPartsMsgList.Columns)
            {
                if (dgCol.Name != colCheck.Name && dgCol.Name != counts.Name&&dgCol.Name!=remarks.Name) dgCol.ReadOnly = true;
            }
            gvPartsMsgList.HeadCheckChanged += new DataGridViewEx.DelegateOnClick(gvPartsMsgList_HeadCheckChanged); //复选框标题显示为复选框状态 


            base.btnExport.Visible = false;
            base.btnConfirm.Visible = false;
            base.btnEdit.Visible = false;
            base.btnBalance.Visible = false;
            base.btnPrint.Visible = false;

        }
        public UCStockCheckAddOrEdit(WindowStatus state, string CheckId, UCStockCheckManager UCCheckManager)
        {
            InitializeComponent();
            DTPickorder_date.Value = DateTime.Now.ToShortDateString();//获取当前系统时间
            this.UCCheckBM = UCCheckManager;//获取其它收货单管理类
            this.status = state;//获取操作状态
            this.StockCheckId = CheckId;//其它收货单ID
            base.DeleteEvent += new ClickHandler(UCStockCheckAddOrEdit_DeleteEvent);
            base.SaveEvent += new ClickHandler(UCStockCheckAddOrEdit_SaveEvent);//保存
            base.SubmitEvent += new ClickHandler(UCStockCheckAddOrEdit_SubmitEvent);//提交
            base.ImportEvent += new ClickHandler(UCStockCheckAddOrEdit_ImportEvent);//导入
            //设置列表的可编辑状态
            gvPartsMsgList.ReadOnly = false;
            foreach (DataGridViewColumn dgCol in gvPartsMsgList.Columns)
            {
                if (dgCol.Name != colCheck.Name && dgCol.Name != FmOffCount.Name && dgCol.Name != remarks.Name) dgCol.ReadOnly = true;

            }
            base.btnExport.Visible = false;
            base.btnConfirm.Visible = false;
            base.btnEdit.Visible = false;
            base.btnBalance.Visible = false;
            base.btnPrint.Visible = false;
            FmOffCount.ValueType=typeof(decimal);
            ProLossCount.ValueType=typeof(decimal);
        }
        public UCStockCheckAddOrEdit(WindowStatus state, string CheckId, UCStockCheckManager UCCheckManager)
        {
            InitializeComponent();
            DTPickorder_date.Value = DateTime.Now.ToShortDateString();//获取当前系统时间
            this.UCCheckBM = UCCheckManager;//获取其它收货单管理类
            this.status = state;//获取操作状态
            this.StockCheckId = CheckId;//其它收货单ID
            base.SaveEvent += new ClickHandler(UCStockCheckAddOrEdit_SaveEvent);//保存
            base.SubmitEvent += new ClickHandler(UCStockCheckAddOrEdit_SubmitEvent);//提交
            base.ImportEvent += new ClickHandler(UCStockCheckAddOrEdit_ImportEvent);//导入
            gvPartsMsgList.ReadOnly = false;
            ID.ReadOnly = true;
            partsnum.ReadOnly = true;
            partname.ReadOnly = true;
            PartSpec.ReadOnly = true;
            drawingnum.ReadOnly = true;
            unitname.ReadOnly = true;
            partbrand.ReadOnly = true;
            CarFactoryCode.ReadOnly = true;
            BarCode.ReadOnly = true;
            Papcounts.ReadOnly = true;
            ProLossCount.ReadOnly = true;
            BusinesPrice.ReadOnly = true;
            Calcmoney.ReadOnly = true;
            base.btnExport.Enabled = false;
            base.btnConfirm.Enabled = false;
            base.btnEdit.Enabled = false;
            base.btnBalance.Enabled = false;
            base.btnPrint.Enabled = false;

        }
        /// <summary> 初始化窗体
        /// </summary>
        /// <param name="status"></param>
        /// <param name="order_id"></param>
        /// <param name="uc"></param>
        public UCPurchaseOrderAddOrEdit(WindowStatus status, string order_id, UCPurchaseOrderManager uc)
        {
            InitializeComponent();
            this.uc = uc;
            this.status = status;
            this.order_id = order_id;
            base.SaveEvent += new ClickHandler(UCPurchaseOrderAddOrEdit_SaveEvent);
            base.SubmitEvent += new ClickHandler(UCPurchaseOrderAddOrEdit_SubmitEvent);
            base.ImportEvent += new ClickHandler(UCPurchaseOrderManager_ImportEvent);
            gvPurchaseList.CellDoubleClick += new DataGridViewCellEventHandler(gvPurchaseList_CellDoubleClick);

            business_counts.ValueType = typeof(decimal);
            business_counts.MaxInputLength = 9;
            original_price.ValueType = typeof(decimal);
            original_price.MaxInputLength = 9;
            discount.ValueType = typeof(decimal);
            discount.MaxInputLength = 3;
            business_price.ValueType = typeof(decimal);
            business_price.MaxInputLength = 9;
            tax_rate.ValueType = typeof(decimal);
            tax_rate.MaxInputLength = 3;

            txtcontract_no.UserControlValueChanged += new TextBoxEx.TextBoxChangedHandle(txtcontract_no_UserControlValueChanged);
            txtprepaid_money.UserControlValueChanged += new TextBoxEx.TextBoxChangedHandle(txtprepaid_money_UserControlValueChanged);
            ddtarrival_date.ValueChanged += new EventHandler(ddtarrival_date_ValueChanged);
        }
        public UCReportedLossBillAddOrEdit(WindowStatus state, string LossId, UCReportedLossBillManager UCLosManager)
        {
            InitializeComponent();
            DTPickorder_date.Value = DateTime.Now.ToShortDateString();//获取当前系统时间
            this.UCLossBM = UCLosManager;//获取报损单管理类
            this.status = state;//获取操作状态
            this.StockLossId = LossId;//报损单ID
            base.SaveEvent += new ClickHandler(UCReportedLossBillAddOrEdit_SaveEvent);//保存
            base.SubmitEvent += new ClickHandler(UCReportedLossBillAddOrEdit_SubmitEvent);//提交
            base.ImportEvent += new ClickHandler(UCReportedLossBillAddOrEdit_ImportEvent);//导入
            gvPartsMsgList.ReadOnly = false;
            ID.ReadOnly = true;
            partsnum.ReadOnly = true;
            partname.ReadOnly = true;
            PartSpec.ReadOnly = true;
            drawingnum.ReadOnly = true;
            UntName.ReadOnly = true;
            partbrand.ReadOnly = true;
            CarFactoryCode.ReadOnly = true;
            BarCode.ReadOnly = true;
            Unitprice.ReadOnly = true;
            Calcmoney.ReadOnly = true;
            //MakDate.ReadOnly = true;
            //ValDate.ReadOnly = true;

            base.btnExport.Enabled = false;
            base.btnConfirm.Enabled = false;
            base.btnEdit.Enabled = false;
            base.btnBalance.Enabled = false;
            base.btnPrint.Enabled = false;

        }
 /// <summary>
 /// 初始化出入单窗体信息
 /// </summary>
 public UCRequisitionAddOrEdit(WindowStatus state, string AllotBillId, UCRequisitionManager UCReqManager)
 {
     InitializeComponent();
     gvPartsMsgList.ReadOnly = false;
     ID.ReadOnly = true;
     partsnum.ReadOnly = true;
     partname.ReadOnly = true;
     PartSpec.ReadOnly = true;
     drawingnum.ReadOnly = true;
     partbrand.ReadOnly = true;
     carpartscode.ReadOnly = true;
     partsbarcode.ReadOnly = true;
     totalmoney.ReadOnly = true;
     makedate.ReadOnly = true;
     validitydate.ReadOnly = true;
     DTPickorder_date.Value = DateTime.Now.ToShortDateString();//获取当前系统时间
     this.UCReqBM = UCReqManager;//获取出入库单管理类
     this.status = state;//获取操作状态
     this.AllotId = AllotBillId;//出入库单ID
     base.SaveEvent += new ClickHandler(UCRequisitionAddOrEdit_SaveEvent);//保存
     base.SubmitEvent += new ClickHandler(UCRequisitionAddOrEdit_SubmitEvent);//提交
     base.ImportEvent += new ClickHandler(UCRequisitionAddOrEdit_ImportEvent);//导入
     base.btnExport.Enabled = false;
     base.btnConfirm.Enabled = false;
     base.btnEdit.Enabled = false;
     base.btnBalance.Enabled = false;
     base.btnPrint.Enabled = false;
 }
Ejemplo n.º 8
0
 bool isAutoClose = false;//是否自动关闭
 #endregion
 public UCReceivableAdd(WindowStatus status, string orderId, UCReceivableManage uc, DataSources.EnumOrderType orderType)
 {
     InitializeComponent();
     this.dgvBalanceDocuments.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                 | System.Windows.Forms.AnchorStyles.Right | AnchorStyles.Bottom)));
     this.windowStatus = status;
     this.orderID = orderId;
     this.uc = uc;
     this.orderType = orderType;
     this.orderTypeName = DataSources.GetDescription(orderType, true);
     colBillingMoney.ValueType = typeof(decimal);
     colSettledMoney.ValueType = typeof(decimal);
     colSettlementMoney.ValueType = typeof(decimal);
     colWaitSettledMoney.ValueType = typeof(decimal);
     colPaidMoney.ValueType = typeof(decimal);
     //colDepositRate.ValueType = typeof(decimal);
     //colDeduction.ValueType = typeof(decimal);
     colMoney.ValueType = typeof(decimal);
     dgvBalanceDocuments.RowHeadersVisible = true;
     dgvPaymentDetail.RowHeadersVisible = true;
     base.SaveEvent += new ClickHandler(UCReceivableAdd_SaveEvent);
     base.ImportEvent += new ClickHandler(UCReceivableAdd_ImportEvent);
     base.SubmitEvent += new ClickHandler(UCReceivableAdd_SubmitEvent);
     base.CancelEvent += new ClickHandler(UCReceivableAdd_CancelEvent);
     base.VerifyEvent += new ClickHandler(UCReceivableAdd_VerifyEvent);
     base.InvalidOrActivationEvent += new ClickHandler(UCReceivableAdd_InvalidOrActivationEvent);
     base.CopyEvent += new ClickHandler(UCReceivableAdd_CopyEvent);
     base.EditEvent += new ClickHandler(UCReceivableAdd_EditEvent);
     base.DeleteEvent += new ClickHandler(UCReceivableAdd_DeleteEvent);
     DataGridViewEx.SetDataGridViewStyle(dgvPaymentDetail, colRemark);
     DataGridViewEx.SetDataGridViewStyle(dgvBalanceDocuments, colDocumentRemark);
 }
        /// <summary>
        /// 初始化出入单窗体信息
        /// </summary>
        public UCRequisitionAddOrEdit(WindowStatus state, string AllotBillId, UCRequisitionManager UCReqManager)
        {
            InitializeComponent();
            DTPickorder_date.Value = DateTime.Now.ToShortDateString();//获取当前系统时间
            this.UCReqBM = UCReqManager;//获取出入库单管理类
            this.status = state;//获取操作状态
            this.AllotId = AllotBillId;//出入库单ID
            base.SaveEvent += new ClickHandler(UCRequisitionAddOrEdit_SaveEvent);//保存
            base.DeleteEvent += new ClickHandler(UCRequisitionAddOrEdit_DeleteEvent);
            base.SubmitEvent += new ClickHandler(UCRequisitionAddOrEdit_SubmitEvent);//提交
            base.ImportEvent += new ClickHandler(UCRequisitionAddOrEdit_ImportEvent);//导入
            //设置列表的可编辑状态
            gvPartsMsgList.ReadOnly = false;
            foreach (DataGridViewColumn dgCol in gvPartsMsgList.Columns)
            {
                if (dgCol.Name != colCheck.Name && dgCol.Name != partcounts.Name && dgCol.Name != callinprice.Name && dgCol.Name != remarks.Name) dgCol.ReadOnly = true;
            }

            base.btnExport.Visible = false;
            base.btnConfirm.Visible = false;
            base.btnEdit.Visible = false;
            base.btnBalance.Visible = false;
            base.btnPrint.Visible = false;
            partcounts.ValueType = typeof(decimal);
            callinprice.ValueType = typeof(decimal);
        }
Ejemplo n.º 10
0
 //构造函数
 public UCSupplierAddOrEdit(WindowStatus status, string suppId, UCSupplierManager uc)
 {
     InitializeComponent();
     //gvUserInfoList.ReadOnly = false;
     this.windowStatus = status;
     this.suppId = suppId;
     this.uc = uc;
     BindDllInfo();
     if (status == WindowStatus.Edit || status == WindowStatus.Copy)
     {
         LoadInfo(suppId);
         GetAllContacts(suppId);
         ucAttr.TableName = "tb_supplier";
         ucAttr.TableNameKeyValue = suppId;
         ucAttr.BindAttachment();
     }
     if (status == WindowStatus.Add || status == WindowStatus.Copy)
     {
         lblsup_code.Text = CommonUtility.GetNewNo(DataSources.EnumProjectType.Supplier);
     }
     base.SaveEvent += new ClickHandler(UCSupplierAddOrEdit_SaveEvent);
     base.CancelEvent += new ClickHandler(UCSupplierAddOrEdit_CancelEvent);
     base.StatusEvent += new ClickHandler(UCSupplierAddOrEdit_StatusEvent);
     base.DeleteEvent += new ClickHandler(UCSupplierAddOrEdit_DeleteEvent);
 }
 bool isAutoClose = false;//是否自动关闭
 #endregion
 public UCAccountVerificationAdd(WindowStatus status, string id, UCAccountVerificationManage uc)
 {
     InitializeComponent();
     this.windowStatus = status;
     this.id = id;
     this.uc = uc;
     colVerificationMoney.ValueType = typeof(decimal);
     colMoney.ValueType = typeof(decimal);
     colSettledMoney.ValueType = typeof(decimal);
     colWaitMoney.ValueType = typeof(decimal);
     colVerificationMoney2.ValueType = typeof(Decimal);
     colMoney2.ValueType = typeof(decimal);
     colSettledMoney2.ValueType = typeof(decimal);
     colWaitMoney2.ValueType = typeof(decimal);
     base.SaveEvent += new ClickHandler(UCAccountVerificationAdd_SaveEvent);
     base.ImportEvent += new ClickHandler(UCAccountVerificationAdd_ImportEvent);
     base.SubmitEvent += new ClickHandler(UCAccountVerificationAdd_SubmitEvent);
     base.CancelEvent += new ClickHandler(UCAccountVerificationAdd_CancelEvent);
     base.VerifyEvent += new ClickHandler(UCAccountVerificationAdd_VerifyEvent);
     base.InvalidOrActivationEvent += new ClickHandler(UCAccountVerificationAdd_InvalidOrActivationEvent);
     base.CopyEvent += new ClickHandler(UCAccountVerificationAdd_CopyEvent);
     base.EditEvent += new ClickHandler(UCAccountVerificationAdd_EditEvent);
     base.DeleteEvent += new ClickHandler(UCAccountVerificationAdd_DeleteEvent);
     DataGridViewEx.SetDataGridViewStyle(dgvDocuments, colRemark);
     DataGridViewEx.SetDataGridViewStyle(dgvDocuments2, colRemark2);
     dgvDocuments.RowHeadersVisible = true;
     dgvDocuments2.RowHeadersVisible = true;
 }
Ejemplo n.º 12
0
        void EditData(WindowStatus status)
        {
            if (status != WindowStatus.Edit && status != WindowStatus.Copy)
            {
                return;
            }
            string title = "编辑";
            string menuId = "UCCashierAccountEdit";
            if (status == WindowStatus.Copy)
            {
                title = "复制";
                menuId = "UCCashierAccountCopy";
            }

            if (dgvRecord.CurrentRow == null)
            {
                MessageBoxEx.Show(string.Format("请选择要{0}的数据!", title));
                return;
            }
            string id = ID;
            if (string.IsNullOrEmpty(id))
            {
                return;
            }

            UCCashierAccountAdd add = new UCCashierAccountAdd(status, id, this);
            base.addUserControl(add, string.Format("出纳账户-{0}", title), menuId + id, this.Tag.ToString(), this.Name);
        }
        public UCModifyPriceAddOrEdit(WindowStatus state, string ModPricId, UCModifyPriceManager UCModManager)
        {
            InitializeComponent();
            DTPickorder_date.Value = DateTime.Now.ToShortDateString();//获取当前系统时间
            this.UCModifyPriceBM = UCModManager;//获取其它收货单管理类
            this.status = state;//获取操作状态
            this.ModifyPriceId = ModPricId;//其它收货单ID
            base.SaveEvent += new ClickHandler(UCModifyPriceAddOrEdit_SaveEvent);//保存
            base.SubmitEvent += new ClickHandler(UCModifyPriceAddOrEdit_SubmitEvent);//提交
            base.ImportEvent += new ClickHandler(UCModifyPriceAddOrEdit_ImportEvent);//导入
            base.DeleteEvent += new ClickHandler(UCModifyPriceAddOrEdit_DeleteEvent);
            //设置列表的可编辑状态
            gvPartsMsgList.ReadOnly = false;
            foreach (DataGridViewColumn dgCol in gvPartsMsgList.Columns)
            {
                if (dgCol.Name != colCheck.Name && dgCol.Name != ModyPricRate.Name
                    &&dgCol.Name != ModyAfterPric.Name && dgCol.Name!=remarks.Name) dgCol.ReadOnly = true;
            }

            base.btnExport.Visible = false;
            base.btnConfirm.Visible = false;
            base.btnEdit.Visible = false;
            base.btnBalance.Visible = false;
            base.btnPrint.Visible = false;
            base.btnExport.Visible = false;

        }
Ejemplo n.º 14
0
 public UCSettlementAddOrEdit(WindowStatus status,string id,UCSettlementManage uc)
 {
     InitializeComponent();
     this.windowStatus = status;
     this.id = id;           
     this.SaveEvent += new ClickHandler(UCSettlementAddOrEdit_SaveEvent);
 }
Ejemplo n.º 15
0
        /// <summary>
        /// 初始化窗体
        /// </summary>
        /// <param name="status"></param>
        /// <param name="sale_order_id"></param>
        /// <param name="uc"></param>
        public UCSaleOrderAddOrEdit(WindowStatus status, string sale_order_id, UCSaleOrderManager uc)
        {
            InitializeComponent();
            this.status = status;
            this.uc = uc;
            this.sale_order_id = sale_order_id;
            base.SaveEvent += new ClickHandler(UCSaleOrderAddOrEdit_SaveEvent);
            base.SubmitEvent += new ClickHandler(UCSaleOrderAddOrEdit_SubmitEvent);
            base.ImportEvent += new ClickHandler(UCSaleOrderAddOrEdit_ImportEvent);

            txtcontract_no.UserControlValueChanged += new TextBoxEx.TextBoxChangedHandle(txtcontract_no_UserControlValueChanged);
            txtadvance_money.KeyPress+=new KeyPressEventHandler(txtadvance_money_KeyPress);
            txtadvance_money.UserControlValueChanged += new TextBoxEx.TextBoxChangedHandle(txtadvance_money_UserControlValueChanged);
            ddldelivery_time.ValueChanged += new EventHandler(ddldelivery_time_ValueChanged);
            gvPurchaseList.CellDoubleClick += new DataGridViewCellEventHandler(gvPurchaseList_CellDoubleClick);

            business_count.ValueType = typeof(decimal);
            business_count.MaxInputLength = 9;
            original_price.ValueType = typeof(decimal);
            original_price.MaxInputLength = 9;
            discount.ValueType = typeof(decimal);
            discount.MaxInputLength = 3;
            business_price.ValueType = typeof(decimal);
            business_price.MaxInputLength = 9;
            tax_rate.ValueType = typeof(decimal);
            tax_rate.MaxInputLength = 3;
        }
Ejemplo n.º 16
0
        public UCWareHouseAddOrEdit(WindowStatus status, string wareHouseId, UCWareHouseManager uc)
        {
            InitializeComponent();
            this.dgvWareHouseList.ReadOnly = false;
            this.windowStatus = status;
            this.wareHouseId = wareHouseId;
            this.uc = uc;
            BindDllInfo();
            if (status == WindowStatus.Edit || status == WindowStatus.Copy)
            {
                LoadInfo(wareHouseId);
                GetAllCargoSpace(wareHouseId);

                ucAttr.TableName = "tb_warehouse";
                ucAttr.TableNameKeyValue = wareHouseId;
                ucAttr.BindAttachment();
            }
            if (status == WindowStatus.Add || status == WindowStatus.Copy)
            {
                lblwh_code.Text = CommonUtility.GetNewNo(DataSources.EnumProjectType.WareHouse);
            }
            base.SaveEvent += new ClickHandler(UCWareHouseAddOrEdit_SaveEvent);
            base.StatusEvent += new ClickHandler(UCWareHouseAddOrEdit_StatusEvent);
            base.DeleteEvent += new ClickHandler(UCWareHouseAddOrEdit_DeleteEvent);

        }
Ejemplo n.º 17
0
 public UCCashierAccountAdd(WindowStatus status, string id, UCCashierAccManage uc)
 {
     InitializeComponent();
     this.windowStatus = status;
     this.id = id;
     this.uc = uc;
     this.SaveEvent += new ClickHandler(UCCashierAccountAdd_SaveEvent);
 }
 public UCBankAccountAddOrEdit(WindowStatus status,string id,UCBankAccountManage uc)
 {
     InitializeComponent();
     this.id = id;
     this.uc = uc;
     base.windowStatus = status;
     this.SaveEvent += new ClickHandler(UCBankAccountAddOrEdit_SaveEvent);
 }
Ejemplo n.º 19
0
 public UCCompanyViewOrAdd(WindowStatus winStatus, string parentName)
 {
     InitializeComponent();
     base.SaveEvent += new ClickHandler(UCCompanyViewOrAdd_SaveEvent);
     base.CancelEvent += new ClickHandler(UCCompanyViewOrAdd_CancelEvent);
     this.winStatus = winStatus;
     this.parentName = parentName;
 }
Ejemplo n.º 20
0
 public UCCompanyView(string _id, UCCompanyManager _uc, WindowStatus _wStatus)
 {
     id = _id;
     uc = _uc;
     windowStatus = _wStatus;
     InitializeComponent();
     base.CancelEvent += new ClickHandler(UCCompanyView_CancelEvent);
     UCCompanyView_Load(null, null);
 }
Ejemplo n.º 21
0
 /// <summary>
 /// 初始化窗体
 /// </summary>
 /// <param name="status"></param>
 /// <param name="sale_plan_id"></param>
 /// <param name="uc"></param>
 public UCSalePlanAddOrEdit(WindowStatus status, string sale_plan_id, UCSalePlanManager uc)
 {
     InitializeComponent();
     this.uc = uc;
     this.status = status;
     this.sale_plan_id = sale_plan_id;
     base.SaveEvent += new ClickHandler(UCSalePlanAddOrEdit_SaveEvent);
     base.SubmitEvent += new ClickHandler(UCSalePlanAddOrEdit_SubmitEvent);
 }
Ejemplo n.º 22
0
 public UCContactsAddOrEdit(WindowStatus status, string contactsId, UCContactsManage uc)
 {
     InitializeComponent();
     this.status = status;
     this.contID = contactsId;
     base.SaveEvent += new ClickHandler(UCContactsAddOrEdit_SaveEvent);
     CancelEvent += new ClickHandler(UCContactsAddOrEdit_CancelEvent);
     this.uc = uc;
 }
 public UCVehicleModelsAddOrEdit(WindowStatus status, string vm_id, UCVehicleModelsManage uc)
 {
     InitializeComponent();
     this.vm_id = vm_id;
     this.windowStatus = status;
     this.SaveEvent += new ClickHandler(UCVehicleModelsAddOrEdit_SaveEvent);
     CancelEvent += new ClickHandler(UCVehicleModelsAddOrEdit_CancelEvent);
     this.uc = uc;
 }
Ejemplo n.º 24
0
 public UCCompanyEdit(DataRow dr, WindowStatus status, string parentName)
 {
     InitializeComponent();
     base.SaveEvent += new ClickHandler(UCCompanyEdit_SaveEvent);
     base.CancelEvent += new ClickHandler(UCCompanyEdit_CancelEvent);
     base.DeleteEvent += new ClickHandler(UCCompanyEdit_DeleteEvent);
     base.StatusEvent += new ClickHandler(UCCompanyEdit_StatusEvent);
     this.drRecord = dr;
     this.parentName = parentName;
 }
 /// <summary>
 /// 窗体初始化
 /// </summary>
 /// <param name="status"></param>
 /// <param name="purchase_billing_id"></param>
 /// <param name="uc"></param>
 public UCPurchaseBillAddOrEdit(WindowStatus status, string purchase_billing_id, UCPurchaseBillManang uc)
 {
     InitializeComponent();
     this.uc = uc;
     this.status = status;
     this.purchase_billing_id = purchase_billing_id;
     base.SaveEvent += new ClickHandler(UCPurchaseBillAddOrEdit_SaveEvent);
     base.SubmitEvent += new ClickHandler(UCPurchaseBillAddOrEdit_SubmitEvent);
     base.ImportEvent += new ClickHandler(UCPurchaseBillAddOrEdit_ImportEvent);
 }
        /// <summary>
        /// 初始化窗体
        /// </summary>
        /// <param name="status"></param>
        /// <param name="plan_id"></param>
        /// <param name="uc"></param>
        public UCPurchasePlanOrderAddOrEdit(WindowStatus status, string plan_id, UCPurchasePlanOrderManager uc)
        {
            InitializeComponent();

            this.uc = uc;
            this.status = status;
            this.plan_id = plan_id;
            base.SaveEvent += new ClickHandler(UCPurchasePlanOrderAddOrEdit_SaveEvent);
            base.SubmitEvent += new ClickHandler(UCPurchasePlanOrderAddOrEdit_SubmitEvent);
        }
 public UCOrganizationAddOrEdit(DataSet ComInfo,WindowStatus FrmStatus)
 {
     InitializeComponent();
     dsCom = ComInfo;
     windowStatus = FrmStatus;
     base.SaveEvent += new ClickHandler(UCOrganizationAddOrEdit_SaveEvent);
     base.CancelEvent += new ClickHandler(UCOrganizationAddOrEdit_CancelEvent);
     base.DeleteEvent += new ClickHandler(UCOrganizationAddOrEdit_DeleteEvent);
     base.StatusEvent += new ClickHandler(UCOrganizationAddOrEdit_StatusEvent);
  
 }
Ejemplo n.º 28
0
        /// <summary> 初始化窗体
        /// </summary>
        /// <param name="status"></param>
        /// <param name="purchase_order_yt_id"></param>
        /// <param name="uc"></param>
        public UCYTAddOrEdit(WindowStatus status, string purchase_order_yt_id, UCYTManager uc)
        {
            InitializeComponent();

            this.uc = uc;
            this.status = status;
            this.purchase_order_yt_id = purchase_order_yt_id;

            base.SaveEvent += new ClickHandler(UCYTAddOrEdit_SaveEvent);
            base.SubmitEvent += new ClickHandler(UCYTAddOrEdit_SubmitEvent);
            base.ImportEvent += new ClickHandler(UCYTAddOrEdit_ImportEvent);
        }
Ejemplo n.º 29
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="winStatus">窗体状态</param>
        /// <param name="dr">数据行</param>
        /// <param name="parentName">父窗体名称</param>
        public UCCompanyAddOrEdit(WindowStatus winStatus, DataRow dr, string parentName)
        {
            InitializeComponent();

            this.winStatus = winStatus;
            this.dr = dr;
            this.parentName = parentName;

            base.SaveEvent += new ClickHandler(UCCompanyAddOrEdit_SaveEvent);
            base.CancelEvent += new ClickHandler(UCCompanyAddOrEdit_CancelEvent);
            this.txtremark.InnerTextBox.Multiline = true;
            this.txtremark.Height *= 2;
            UCCompanyAddOrEdit_Load(null, null);
        }
Ejemplo n.º 30
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="winStatus">窗体状态</param>
        /// <param name="dr">数据行</param>
        /// <param name="parentName">父窗体名称</param>
        public UCBulletinAddOrEdit(WindowStatus winStatus, DataRow dr, string parentName)
        {
            InitializeComponent();

            windowStatus = winStatus;
            this.dr = dr;
            if (this.dr != null)
            {
                this.id = dr["announcement_id"].ToString();
            }
            this.webContent.Url = new System.Uri(Application.StartupPath + "\\kindeditor\\e.html", System.UriKind.Absolute);
            this.parentName = parentName;
            this.webContent.ObjectForScripting = this;
        }
Ejemplo n.º 31
0
    void TopPanel()
    {
        string content = "";

        if (m_status == WindowStatus.AppDomain)
        {
            content += "应用程序视图:";
            content += AppDomain.CurrentDomain.FriendlyName;
        }
        else if (m_status == WindowStatus.Assembly)
        {
            if (m_currentAssembly == null)
            {
                m_status = WindowStatus.AppDomain;
                return;
            }
            content += "程序集视图:" + m_currentAssembly.FullName;
        }
        else if (m_status == WindowStatus.Class)
        {
            if (m_currentClass == null)
            {
                m_status      = WindowStatus.Assembly;
                toolbarOption = 0;
                return;
            }

            content += "类视图:" + m_currentClass.FullName;
        }
        else if (m_status == WindowStatus.Method)
        {
            if (m_currentMethod == null)
            {
                m_status      = WindowStatus.Class;
                toolbarOption = 0;
                return;
            }

            content += "方法详细视图:" + m_currentClass.FullName + " " + m_currentMethod.Name;
        }

        GUILayout.Label(content, "PreLabel");

        GUILayout.BeginHorizontal();

        GUI.SetNextControlName("Search");
        GUILayout.Label("在当前页面下搜索:", GUILayout.Width(110));

        m_searchTmp = GUILayout.TextField(m_searchTmp, "SearchTextField");

        if (GUILayout.Button("清除", "SearchCancelButton", GUILayout.Width(50)))
        {
            m_searchTmp = "";
        }

        GUILayout.EndHorizontal();
        EditorGUILayout.Space();

        if (m_status == WindowStatus.AppDomain)
        {
            m_searchAssemblyContent = m_searchTmp;
        }
        else if (m_status == WindowStatus.Assembly)
        {
            m_searchClassContent = m_searchTmp;
        }
        else if (m_status == WindowStatus.Class)
        {
            m_searchMethodContent = m_searchTmp;
        }
    }
Ejemplo n.º 32
0
        /// <summary> 根据窗体状态更改控件状态(新增窗体)
        /// </summary>
        /// <param name="status">窗体状态</param>
        public void SetBtnStatus2(WindowStatus status)
        {
            windowStatus = status;

            //根据窗体状态,设置当前窗体的控件的状态
            switch (status)
            {
            case WindowStatus.Add:
                btnAdd.Enabled    = false;
                btnCopy.Enabled   = false;
                btnEdit.Enabled   = false;
                btnDelete.Enabled = false;
                btnStatus.Enabled = false;
                btnSave.Enabled   = true;
                btnCancel.Enabled = true;
                btnImport.Enabled = false;
                btnExport.Enabled = false;
                btnView.Enabled   = false;
                btnPrint.Enabled  = false;
                btnSet.Enabled    = false;
                break;

            case WindowStatus.Copy:
                btnAdd.Enabled    = false;
                btnCopy.Enabled   = false;
                btnEdit.Enabled   = false;
                btnDelete.Enabled = false;
                btnStatus.Enabled = false;
                btnSave.Enabled   = true;
                btnCancel.Enabled = true;
                btnImport.Enabled = false;
                btnExport.Enabled = false;
                btnView.Enabled   = false;
                btnPrint.Enabled  = false;
                btnSet.Enabled    = false;
                break;

            case WindowStatus.Edit:
                btnAdd.Enabled    = false;
                btnCopy.Enabled   = false;
                btnEdit.Enabled   = false;
                btnDelete.Enabled = false;
                btnStatus.Enabled = false;
                btnSave.Enabled   = true;
                btnCancel.Enabled = true;
                btnImport.Enabled = false;
                btnExport.Enabled = false;
                btnView.Enabled   = false;
                btnPrint.Enabled  = false;
                btnSet.Enabled    = false;
                break;

            case WindowStatus.Save:
                btnAdd.Enabled    = true;
                btnCopy.Enabled   = true;
                btnEdit.Enabled   = true;
                btnDelete.Enabled = true;
                btnStatus.Enabled = true;
                btnSave.Enabled   = false;
                btnCancel.Enabled = false;
                btnImport.Enabled = false;
                btnExport.Enabled = false;
                btnView.Enabled   = false;
                btnPrint.Enabled  = false;
                btnSet.Enabled    = false;
                break;

            case WindowStatus.Cancel:
                btnAdd.Enabled    = true;
                btnCopy.Enabled   = true;
                btnEdit.Enabled   = true;
                btnDelete.Enabled = true;
                btnStatus.Enabled = true;
                btnSave.Enabled   = false;
                btnCancel.Enabled = false;
                btnImport.Enabled = false;
                btnExport.Enabled = false;
                btnView.Enabled   = false;
                btnPrint.Enabled  = false;
                btnSet.Enabled    = false;
                break;

            case WindowStatus.View:
                btnAdd.Enabled    = false;
                btnCopy.Enabled   = false;
                btnEdit.Enabled   = false;
                btnDelete.Enabled = false;
                btnStatus.Enabled = false;
                btnSave.Enabled   = false;
                btnCancel.Enabled = false;
                break;

            default:
                break;
            }
        }
Ejemplo n.º 33
0
 /// <summary>
 /// 根据调价单主键ID和表头信息对配件信息列表进行添加或编辑
 /// </summary>
 /// <param name="listSQL">要执行的SQL语句列表</param>
 /// <param name="ModyPricId">调价单号</param>
 private void AddOrEditPartsListMsg(List <SysSQLString> listSQL, string ModyPricId, WindowStatus WinState)
 {
     try
     {
         if (gvPartsMsgList.Rows.Count > 0)
         {
             //循环获取配件信息表中的数据记录,添加到数据库中
             StringBuilder sb          = new StringBuilder();
             StringBuilder sb_ColName  = new StringBuilder();
             StringBuilder sb_ColValue = new StringBuilder();
             string        ColName     = string.Empty;
             for (int i = 3; i < gvPartsMsgList.Columns.Count; i++)
             {
                 ColName = gvPartsMsgList.Columns[i].DataPropertyName.ToString();
                 sb_ColName.Append("," + ColName);   //数据表字段名
                 sb_ColValue.Append(",@" + ColName); //数据表值的参数名
             }
             if (WinState == WindowStatus.Edit)
             {
                 SysSQLString SQLStr = new SysSQLString(); //创建存储要删除sql语句的实体类
                 SQLStr.cmdType = CommandType.Text;        //sql语句执行格式
                 Dictionary <string, string> DicDelParam = new Dictionary <string, string>();
                 StringBuilder sbDelSql = new StringBuilder();
                 DicDelParam.Add("stock_modifyprice_id", ModyPricId);
                 sbDelSql.AppendFormat("delete from {0} where {1}=@{1}", ModPartTable, ModifyPriceBillID);
                 SQLStr.Param     = DicDelParam;         //获取删除的参数名值对
                 SQLStr.sqlString = sbDelSql.ToString(); //获取执行删除的操作
                 listSQL.Add(SQLStr);                    //添加到执行实例对像中
             }
             sb.Append("insert into tb_parts_stock_modifyprice_p (stock_modifyprice_parts_id,stock_modifyprice_id,num");
             sb.Append(sb_ColName.ToString() + ") values(@stock_modifyprice_parts_id,@stock_modifyprice_id,@num" + sb_ColValue.ToString() + ");");
             int SerialNum = 1;
             foreach (DataGridViewRow DgVRow in gvPartsMsgList.Rows)
             {
                 SysSQLString StrSqlParts = new SysSQLString();                                //创建存储要执行的sql语句的实体类
                 StrSqlParts.cmdType = CommandType.Text;                                       //指定sql语句执行格式
                 Dictionary <string, string> DicPartParam = new Dictionary <string, string>(); //字段参数值集合
                 DicPartParam.Add("stock_modifyprice_parts_id", Guid.NewGuid().ToString());
                 DicPartParam.Add("stock_modifyprice_id", ModyPricId);
                 DicPartParam.Add("num", SerialNum.ToString());
                 DicPartParam.Add("parts_code", DgVRow.Cells["partsnum"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["partsnum"].Value.ToString());
                 DicPartParam.Add("parts_name", DgVRow.Cells["partname"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["partname"].Value.ToString());
                 DicPartParam.Add("model", DgVRow.Cells["PartSpec"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["PartSpec"].Value.ToString());
                 DicPartParam.Add("drawing_num", DgVRow.Cells["drawingnum"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["drawingnum"].Value.ToString());
                 DicPartParam.Add("unit_name", DgVRow.Cells["unitname"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["unitname"].Value.ToString());
                 DicPartParam.Add("parts_brand", DgVRow.Cells["partbrand"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["partbrand"].Value.ToString());
                 DicPartParam.Add("car_parts_code", DgVRow.Cells["CarFactoryCode"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["CarFactoryCode"].Value.ToString());
                 DicPartParam.Add("parts_barcode", DgVRow.Cells["BarCode"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["BarCode"].Value.ToString());
                 DicPartParam.Add("counts", DgVRow.Cells["counts"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["counts"].Value.ToString());
                 DicPartParam.Add("modify_price", DgVRow.Cells["ModyUnitprice"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["ModyUnitprice"].Value.ToString());
                 DicPartParam.Add("modifyprice_ratio", DgVRow.Cells["ModyPricRate"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["ModyPricRate"].Value.ToString());
                 DicPartParam.Add("modify_after_price", DgVRow.Cells["ModyAfterPric"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["ModyAfterPric"].Value.ToString());
                 DicPartParam.Add("money", DgVRow.Cells["Calcmoney"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["Calcmoney"].Value.ToString());
                 DicPartParam.Add("remark", DgVRow.Cells["remarks"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["remarks"].Value.ToString());
                 StrSqlParts.sqlString = sb.ToString(); //获取执行的sql语句
                 StrSqlParts.Param     = DicPartParam;  //获取执行的参数值
                 listSQL.Add(StrSqlParts);              //添加记录行到list列表中
                 SerialNum++;                           //序号自动增加
             }
         }
     }
     catch (Exception ex)
     {
         MessageBoxEx.Show(ex.Message, "异常提示", MessageBoxButtons.OK, MessageBoxIcon.Question);
     }
 }
Ejemplo n.º 34
0
    void MethodGUI(MethodInfo method)
    {
        GUILayout.BeginHorizontal("box");

        string content  = "";
        string content2 = "";
        string content3 = "";

        if (!method.IsPublic)
        {
            content += "<color=red>Private</color> ";
        }

        if (!method.IsStatic)
        {
            content2 += "<color=yellow>Static</color> ";
        }

        content3 += "<color=#11FF11>" + GetTypeName(method.ReturnType) + "</color> <color=white>" + method.Name + "</color>";

        if (method.IsGenericMethod)
        {
            Type[] types = method.GetGenericArguments();

            content3 += "<color=grey><</color>";

            for (int i = 0; i < types.Length; i++)
            {
                content3 += "<color=#11FF11>" + GetTypeName(types[i]) + "</color>";

                if (i != types.Length - 1)
                {
                    content3 += ",";
                }
            }
            content3 += "<color=grey>></color>";
        }

        content3 += " <color=grey>(</color>";

        ParameterInfo[] infos = method.GetParameters();
        for (int i = 0; i < infos.Length; i++)
        {
            content3 += GetParmPrdfix(infos[i], true) + "<color=#11FF11>" + GetTypeName(infos[i].ParameterType) + "</color> <color=#FF77FF>" + infos[i].Name + "</color>" + GetParmPostfix(infos[i], true);

            if (i != infos.Length - 1)
            {
                content3 += " <color=grey>,</color> ";
            }
        }

        content3 += "<color=grey>)</color>";

        GUILayout.Label(content, EditorGUIStyleData.RichText, GUILayout.Width(55));
        GUILayout.Label(content2, EditorGUIStyleData.RichText, GUILayout.Width(50));
        GUILayout.Label(content3, EditorGUIStyleData.RichText);

        if (!method.IsPublic)
        {
            if (GUILayout.Button("生成调用代码", GUILayout.Width(200)))
            {
                m_callContent = GenerateCallCode(m_currentAssembly, m_currentClass, method);
                GUI.FocusControl("Search");
            }
        }

        if (GUILayout.Button("查看详细信息", GUILayout.Width(200)))
        {
            m_status        = WindowStatus.Method;
            m_currentMethod = method;
        }

        GUILayout.EndHorizontal();
    }
Ejemplo n.º 35
0
        /// <summary>
        /// 根据调拨单主键ID和表头信息对配件信息列表进行添加或编辑
        /// </summary>
        /// <param name="listSQL">要执行的SQL语句列表</param>
        /// <param name="AllotIdValue">出入库单号</param>
        private void AddOrEditPartsListMsg(List <SysSQLString> listSQL, string AllotIdValue, WindowStatus WinState)
        {
            try
            {
                if (gvPartsMsgList.Rows.Count > 0)
                {
                    //循环获取配件信息表中的数据记录,添加到数据库中
                    StringBuilder sb          = new StringBuilder();
                    StringBuilder sb_ColName  = new StringBuilder();
                    StringBuilder sb_ColValue = new StringBuilder();
                    string        ColName     = string.Empty;
                    for (int i = 1; i < gvPartsMsgList.Columns.Count; i++)
                    {
                        ColName = gvPartsMsgList.Columns[i].DataPropertyName.ToString();
                        if (!string.IsNullOrEmpty(ColName))
                        {
                            sb_ColName.Append("," + ColName);   //数据表字段名
                            sb_ColValue.Append(",@" + ColName); //数据表值的参数名
                        }
                    }
                    if (WinState == WindowStatus.Edit)
                    {
                        SysSQLString SQLStr = new SysSQLString(); //创建存储要删除sql语句的实体类
                        SQLStr.cmdType = CommandType.Text;        //sql语句执行格式
                        Dictionary <string, string> DicDelParam = new Dictionary <string, string>();
                        StringBuilder sbDelSql = new StringBuilder();
                        DicDelParam.Add("stock_allot_id", AllotIdValue);
                        sbDelSql.AppendFormat("delete from {0} where {1}=@{1}", AllotPartTable, AllotBillId);
                        SQLStr.Param     = DicDelParam;         //获取删除的参数名值对
                        SQLStr.sqlString = sbDelSql.ToString(); //获取执行删除的操作
                        listSQL.Add(SQLStr);                    //添加到执行实例对像中
                    }
                    sb.Append("insert into " + AllotPartTable + " (" + AllotPartId + "," + AllotBillId + ",num");
                    sb.Append(sb_ColName.ToString() + ") values(@" + AllotPartId + ",@" + AllotBillId + ",@num" + sb_ColValue.ToString() + ");");
                    int SerialNum = 1;
                    foreach (DataGridViewRow DgVRow in gvPartsMsgList.Rows)
                    {
                        SysSQLString StrSqlParts = new SysSQLString();                                //创建存储要执行的sql语句的实体类
                        StrSqlParts.cmdType = CommandType.Text;                                       //指定sql语句执行格式
                        Dictionary <string, string> DicPartParam = new Dictionary <string, string>(); //字段参数值集合
                        DicPartParam.Add(AllotPartId, Guid.NewGuid().ToString());                     //生成调拨单配件主键ID
                        DicPartParam.Add(AllotBillId, AllotIdValue);                                  //获取调拨单主键ID
                        DicPartParam.Add("num", SerialNum.ToString());
                        DicPartParam.Add("parts_code", DgVRow.Cells["partsnum"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["partsnum"].Value.ToString());
                        DicPartParam.Add("parts_name", DgVRow.Cells["partname"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["partname"].Value.ToString());
                        DicPartParam.Add("model", DgVRow.Cells["PartSpec"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["PartSpec"].Value.ToString());
                        DicPartParam.Add("drawing_num", DgVRow.Cells["drawingnum"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["drawingnum"].Value.ToString());
                        DicPartParam.Add("unit_name", DgVRow.Cells["unitname"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["unitname"].Value.ToString());
                        DicPartParam.Add("parts_brand", DgVRow.Cells["partbrand"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["partbrand"].Value.ToString());          //品牌
                        DicPartParam.Add("car_parts_code", DgVRow.Cells["carpartscode"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["carpartscode"].Value.ToString()); //车厂编码
                        DicPartParam.Add("parts_barcode", DgVRow.Cells["partsbarcode"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["partsbarcode"].Value.ToString());
                        DicPartParam.Add("counts", DgVRow.Cells["partcounts"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["partcounts"].Value.ToString());
                        DicPartParam.Add("call_in_price", DgVRow.Cells["callinprice"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["callinprice"].Value.ToString());
                        DicPartParam.Add("money", DgVRow.Cells["totalmoney"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["totalmoney"].Value.ToString());
                        //long MkDate = Common.LocalDateTimeToUtcLong(Convert.ToDateTime(DgVRow.Cells["makedate"].Value.ToString()));
                        //DicPartParam.Add("make_date", MkDate.ToString() == string.Empty ? "" : MkDate.ToString());
                        //long ValDate = Common.LocalDateTimeToUtcLong(Convert.ToDateTime(DgVRow.Cells["validitydate"].Value.ToString()));
                        //DicPartParam.Add("validity_date", ValDate.ToString() == string.Empty ? "" : ValDate.ToString());
                        DicPartParam.Add("remark", DgVRow.Cells["remarks"].Value.ToString() == string.Empty ? "" : DgVRow.Cells["remarks"].Value.ToString());


                        StrSqlParts.sqlString = sb.ToString(); //获取执行的sql语句
                        StrSqlParts.Param     = DicPartParam;  //获取执行的参数值
                        listSQL.Add(StrSqlParts);              //添加记录行到list列表中
                        SerialNum++;                           //自动增加序号
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBoxEx.Show(ex.Message, "异常提示", MessageBoxButtons.OK, MessageBoxIcon.Question);
            }
        }
Ejemplo n.º 36
0
        public static bool UpdateLocation(OverlayWindow window)
        {
            RECT         rect   = PPTRect.GetRect();
            WindowStatus status = PPTRect.GetWindowStatus();

            FrameworkElement content = window.Content as FrameworkElement;

            int validHeight = rect.Height - OffsetHeight;
            int validWidth  = rect.Width - OffsetWidth;

            double scaleY = (double)validHeight / ValidHeight;
            double scaleX = (double)validWidth / PPTRect.ValidWidth;

            if (rect.Width == SystemParameters.PrimaryScreenWidth && rect.Height == SystemParameters.PrimaryScreenHeight)
            {
                content.LayoutTransform = new ScaleTransform(1, 1);
                window.Top    = 0;
                window.Left   = 0;
                window.Height = SystemParameters.PrimaryScreenHeight;
                window.Width  = SystemParameters.PrimaryScreenWidth;

                return(true);
            }
            else if (validHeight <= 0 || validWidth <= 0 || status == WindowStatus.Minimized || status == WindowStatus.Closed)
            {
                window.Visibility = Visibility.Hidden;
                return(false);
            }
            else
            {
                if (!window.IsCapturable)
                {
                    window.Topmost = false;
                    window.Topmost = (status == WindowStatus.Focused);
                }

                int validTop  = rect.Top - OffsetTop;
                int validLeft = rect.Left - OffsetLeft;

                if (window.Visibility != Visibility.Visible)
                {
                    window.Visibility = Visibility.Visible;
                }

                if (window.Top != validTop)
                {
                    window.Top = validTop;
                }
                if (window.Left != validLeft)
                {
                    window.Left = validLeft;
                }
                if (window.Height != validHeight && window.Width != validWidth)
                {
                    content.LayoutTransform = new ScaleTransform(scaleX, scaleY);
                    window.Height           = validHeight;
                    window.Width            = validWidth;
                }

                return(true);
            }
        }
Ejemplo n.º 37
0
 public void MoveTo(Vector3 newPos, Quaternion newRot, Vector3 newSize, bool animate, WindowStatus postStatus)
 {
     //if (!pinned)
     //{
     if (animate)
     {
         posStart        = transform.position;
         posEnd          = newPos;
         rotStart        = transform.rotation;
         rotEnd          = newRot;
         sizeStart       = transform.localScale;
         sizeEnd         = newSize;
         moveDur         = MoveDurDefault;
         moveTimer       = 0;
         this.postStatus = postStatus;
         state           = WindowState.Moving;
     }
     else
     {
         transform.position   = newPos;
         transform.rotation   = newRot;
         transform.localScale = newSize;
         Status = postStatus;
     }
     //}
 }
Ejemplo n.º 38
0
 private void BtnRefresh_Click(object sender, EventArgs e)
 {
     CurrentStatus = WindowStatus.LoadingInfo;
     ThreadPool.QueueUserWorkItem(RefreshInfo);
 }
Ejemplo n.º 39
0
        /// <summary> 根据窗体状态更改控件状态(操作本页数据)
        /// syn
        /// </summary>
        /// <param name="status">窗体状态</param>
        public void SetBtnStatus(WindowStatus status)
        {
            this.windowStatus = status;
            //根据窗体状态,设置当前窗体的控件的状态
            switch (status)
            {
            case WindowStatus.Add:
                btnAdd.Enabled     = false;
                btnCopy.Enabled    = false;
                btnEdit.Enabled    = false;
                btnDelete.Enabled  = false;
                btnStatus.Enabled  = false;
                btnBalance.Enabled = false;
                btnVerify.Enabled  = false;
                btnImport.Enabled  = false;
                btnExport.Enabled  = false;

                btnView.Enabled  = false;
                btnPrint.Enabled = false;
                btnSet.Enabled   = false;

                btnActivation.Enabled = false;

                btnSync.Enabled = false;

                btnConfirm.Enabled = false;
                btnSubmit.Enabled  = false;
                btnCommit.Enabled  = false;
                btnRevoke.Enabled  = false;

                #region --不可见
                btnAdd.Visible     = false;
                btnCopy.Visible    = false;
                btnEdit.Visible    = false;
                btnDelete.Visible  = false;
                btnStatus.Visible  = false;
                btnBalance.Visible = false;
                btnVerify.Visible  = false;
                btnImport.Visible  = false;
                btnExport.Visible  = false;

                btnView.Visible  = false;
                btnPrint.Visible = false;
                btnSet.Visible   = false;

                btnActivation.Visible = false;

                btnSync.Visible = false;

                btnConfirm.Visible = false;
                btnSubmit.Visible  = false;
                btnCommit.Visible  = false;
                btnRevoke.Visible  = false;
                #endregion

                btnSave.Enabled   = true;
                btnCancel.Enabled = true;
                break;

            case WindowStatus.Copy:
            case WindowStatus.Edit:
                btnAdd.Enabled     = false;
                btnCopy.Enabled    = false;
                btnEdit.Enabled    = false;
                btnDelete.Enabled  = false;
                btnStatus.Enabled  = false;
                btnBalance.Enabled = false;
                btnVerify.Enabled  = false;
                btnImport.Enabled  = false;
                btnExport.Enabled  = false;

                btnView.Enabled  = false;
                btnPrint.Enabled = false;
                btnSet.Enabled   = false;

                btnSubmit.Enabled  = false;
                btnConfirm.Enabled = false;
                btnCommit.Enabled  = false;
                btnRevoke.Enabled  = false;

                btnActivation.Enabled = false;

                btnSync.Enabled = false;

                btnSave.Enabled   = true;
                btnCancel.Enabled = true;
                break;

            case WindowStatus.Save:
                btnAdd.Enabled     = true;
                btnCopy.Enabled    = true;
                btnEdit.Enabled    = true;
                btnDelete.Enabled  = true;
                btnStatus.Enabled  = true;
                btnBalance.Enabled = true;
                btnVerify.Enabled  = true;
                btnImport.Enabled  = true;
                btnExport.Enabled  = true;

                btnView.Enabled  = true;
                btnPrint.Enabled = true;
                btnSet.Enabled   = true;

                btnSubmit.Enabled  = true;
                btnConfirm.Enabled = true;
                btnCommit.Enabled  = true;
                btnRevoke.Enabled  = true;

                btnActivation.Enabled = true;

                btnSync.Enabled = true;

                btnSave.Enabled   = false;
                btnCancel.Enabled = false;

                break;

            case WindowStatus.Cancel:
                btnAdd.Enabled     = true;
                btnCopy.Enabled    = true;
                btnEdit.Enabled    = true;
                btnDelete.Enabled  = true;
                btnStatus.Enabled  = true;
                btnBalance.Enabled = true;
                btnVerify.Enabled  = true;
                btnImport.Enabled  = true;
                btnExport.Enabled  = true;

                btnView.Enabled  = true;
                btnPrint.Enabled = true;
                btnSet.Enabled   = true;

                btnSubmit.Enabled  = true;
                btnConfirm.Enabled = true;
                btnCommit.Enabled  = true;
                btnRevoke.Enabled  = true;

                btnActivation.Enabled = true;

                btnSync.Enabled = true;

                btnSave.Enabled   = false;
                btnCancel.Enabled = false;
                break;

            case WindowStatus.View:
                btnAdd.Enabled     = true;
                btnCopy.Enabled    = true;
                btnEdit.Enabled    = true;
                btnDelete.Enabled  = true;
                btnStatus.Enabled  = true;
                btnBalance.Enabled = true;
                btnVerify.Enabled  = true;
                btnImport.Enabled  = true;
                btnExport.Enabled  = true;

                btnView.Enabled  = true;
                btnPrint.Enabled = true;
                btnSet.Enabled   = true;

                btnSubmit.Enabled  = true;
                btnConfirm.Enabled = true;
                btnCommit.Enabled  = true;
                btnRevoke.Enabled  = true;

                btnActivation.Enabled = true;

                btnSync.Enabled = true;

                btnSave.Enabled   = false;
                btnCancel.Enabled = false;
                break;

            default:
                break;
            }
        }