void OpenDocument()
 {
     if (dgvReport.CurrentRow == null)
     {
         return;
     }
     string orderId = Convert.ToString(this.dgvReport.CurrentRow.Cells[colID.Name].Value);
     if (orderId.Length == 0)
     {
         return;
     }
     string type = dgvReport.CurrentRow.Cells[colType.Name].Value.ToString();
     switch (type)
     {
         case "销售开单":
             UCSaleBillView ucSaleView = new UCSaleBillView(orderId, null);
             base.addUserControl(ucSaleView, "销售开单-查看", "UCSaleBillView" + orderId + "", this.Tag.ToString(), this.Name);
             break;
         case "三包结算单":
             UCThreeGuarantySettlementView ucView = new UCThreeGuarantySettlementView();
             ucView.SettlementId = orderId;
             base.addUserControl(ucView, "三包结算单-查看", "UCThreeGuarantySettlementView" + orderId, this.Tag.ToString(), this.Name);
             break;
         case "维修结算单":
             UCRepairBalanceView ucRepairView = new UCRepairBalanceView(orderId);
             base.addUserControl(ucRepairView, "维修结算单-查看", "UCRepairBalanceView" + orderId, this.Tag.ToString(), this.Name);
             break;
         case "销售收款":
             UCReceivableAdd ucPayable = new UCReceivableAdd(WindowStatus.View, orderId, null, DataSources.EnumOrderType.RECEIVABLE);
             base.addUserControl(ucPayable, "应收账款-预览", "UCReceivableAdd" + orderId, this.Tag.ToString(), this.Name);
             break;
         case "往来核销":
             UCAccountVerificationAdd ucAccountVerificationView = new UCAccountVerificationAdd(WindowStatus.View, orderId, null);
             base.addUserControl(ucAccountVerificationView, "往来核销-预览", "UCAccountVerificationAdd" + orderId, this.Tag.ToString(), this.Name);
             break;
     }
 }
 // 预览数据
 private void ViewData()
 {
     if (dgvBillReceivable.CurrentRow == null)
     {
         MessageBoxEx.Show("请选择要预览的数据!");
         return;
     }
     string id = ID;
     if (string.IsNullOrEmpty(id))
     {
         return;
     }
     UCReceivableAdd view = new UCReceivableAdd(WindowStatus.View, id, this, orderType);
     base.addUserControl(view, Title + "-预览", "UCReceivableView" + orderType.ToString() + id, this.Tag.ToString(), this.Name);
 }
 void OpenDocument()
 {
     if (dgvReport.CurrentRow == null)
     {
         return;
     }
     string orderId = Convert.ToString(this.dgvReport.CurrentRow.Cells[colID.Name].Value);
     if (orderId.Length == 0)
     {
         return;
     }
     string type = dgvReport.CurrentRow.Cells[colType.Name].Value.ToString();
     switch (type)
     {
         case "采购开单":
             UCPurchaseBillView ucPurchaseView = new UCPurchaseBillView(orderId, null);
             base.addUserControl(ucPurchaseView, "采购开单-查看", "UCPurchaseBillView" + orderId + "", this.Tag.ToString(), this.Name);
             break;
         case "采购收款":
             UCReceivableAdd ucPayable = new UCReceivableAdd(WindowStatus.View, orderId, null, DataSources.EnumOrderType.PAYMENT);
             base.addUserControl(ucPayable, "应付账款-预览", "UCReceivableAdd" + orderId, this.Tag.ToString(), this.Name);
             break;
         case "往来核销":
             UCAccountVerificationAdd ucAccountVerificationView = new UCAccountVerificationAdd(WindowStatus.View, orderId, null);
             base.addUserControl(ucAccountVerificationView, "往来核销-预览", "UCAccountVerificationAdd" + orderId, this.Tag.ToString(), this.Name);
             break;
     }
 }
        // 编辑数据
        private void EditData(WindowStatus status)
        {
            if (status != WindowStatus.Edit && status != WindowStatus.Copy)
            {
                return;
            }
            string title = "编辑";
            string menuId = "UCReceivableEdit";
            if (status == WindowStatus.Copy)
            {
                title = "复制";
                menuId = "UCReceivableCopy";
            }
            if (dgvBillReceivable.CurrentRow == null)
            {
                MessageBoxEx.Show(string.Format("请选择要{0}的数据!", title));
                return;
            }
            string id = ID;
            if (string.IsNullOrEmpty(id))
            {
                return;
            }

            UCReceivableAdd add = new UCReceivableAdd(status, id, this, this.orderType);
            base.addUserControl(add, string.Format("{0}-{1}", Title, title), menuId + orderType.ToString() + id, this.Tag.ToString(), this.Name);
        }
 //新增
 void AddData()
 {
     UCReceivableAdd add = new UCReceivableAdd(WindowStatus.Add, null, this, this.orderType);
     this.addUserControl(add, string.Format("{0}-新增", Title), "UCReceivableAdd" + orderType.ToString(), this.Tag.ToString(), this.Name);
 }
Esempio n. 6
0
        // 编辑数据
        private void EditData(WindowStatus status)
        {
            if (status != WindowStatus.Edit && status != WindowStatus.Copy)
            {
                return;
            }
            string title = string.Empty;
            if (orderType == DataSources.EnumOrderType.PAYMENT)
            {
                title = "应付账款";
            }
            else
            {
                title = "应收账款";
            }
            string edit = "编辑";
            string menuId = "UCReceivableEdit";
            if (status == WindowStatus.Copy)
            {
                edit = "复制";
                menuId = "UCReceivableCopy";
            }
            if (string.IsNullOrEmpty(orderID))
            {
                return;
            }

            UCReceivableAdd add = new UCReceivableAdd(status, orderID, uc, this.orderType);
            base.addUserControl(add, string.Format("{0}-{1}", title, edit), menuId + orderType.ToString() + orderID, this.Tag.ToString(), this.Name);
        }
 void OpenDocument()
 {
     if (dgvReport.CurrentRow == null)
     {
         return;
     }
     string orderId = Convert.ToString(this.dgvReport.CurrentRow.Cells[colOrderID.Name].Value);
     if (orderId.Length == 0)
     {
         return;
     }
     UCReceivableAdd UCPurchaseBillView = new UCReceivableAdd(WindowStatus.View, orderId, null, DataSources.EnumOrderType.PAYMENT);
     base.addUserControl(UCPurchaseBillView, "应付账款-查看", "UCReceivableAdd" + orderId + "", this.Tag.ToString(), this.Name);
 }
Esempio n. 8
0
 void OpenDocument()
 {
     if (dgvReport.CurrentRow == null)
     {
         return;
     }
     //单据ID
     string orderId = Convert.ToString(this.dgvReport.CurrentRow.Cells[colID.Name].Value);
     if (orderId.Length == 0)
     {
         return;
     }
     //单据类型
     string orderType = CommonCtrl.IsNullToString(dgvReport.CurrentRow.Cells[colOrderType.Name].Value);
     if (orderType.Length == 0)
     {
         return;
     }
     string viewTitle = "应收账款-查看";//明细标题
     DataSources.EnumOrderType enumOrderType = (DataSources.EnumOrderType)Convert.ToInt32(orderType);
     if (enumOrderType == DataSources.EnumOrderType.PAYMENT)
     {
         viewTitle = "应付账款-查看";
     }
     UCReceivableAdd ucView = new UCReceivableAdd(WindowStatus.View, orderId, null, enumOrderType);
     base.addUserControl(ucView, viewTitle, "UCReceivableAdd" + orderId, this.Tag.ToString(), this.Name);
 }