예제 #1
0
        void EditData(WindowStatus status)
        {
            if (status != WindowStatus.Edit && status != WindowStatus.Copy)
            {
                return;
            }
            string title  = "编辑";
            string menuId = "UCSettlementEdit";

            if (status == WindowStatus.Copy)
            {
                title  = "复制";
                menuId = "UCSettlementCopy";
            }

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

            if (string.IsNullOrEmpty(id))
            {
                return;
            }

            UCSettlementAddOrEdit uc = new UCSettlementAddOrEdit(status, id, this);

            uc.RefreshDataStart -= new UCSettlementAddOrEdit.RefreshData(this.BindData);
            uc.RefreshDataStart += new UCSettlementAddOrEdit.RefreshData(this.BindData);
            base.addUserControl(uc, string.Format("结算方式-{0}", title), menuId + id, this.Tag.ToString(), this.Name);
        }
예제 #2
0
        void UCSettlementManage_AddEvent(object sender, EventArgs e)
        {
            UCSettlementAddOrEdit uc = new UCSettlementAddOrEdit(WindowStatus.Add, null, this);

            uc.RefreshDataStart -= new UCSettlementAddOrEdit.RefreshData(this.BindData);
            uc.RefreshDataStart += new UCSettlementAddOrEdit.RefreshData(this.BindData);
            this.addUserControl(uc, "结算方式-新建", "UCSettlementAdd", this.Tag.ToString(), this.Name);
        }
예제 #3
0
        void ViewData()
        {
            if (dgvRecord.CurrentRow == null)
            {
                MessageBoxEx.Show("请选择要预览的数据!");
                return;
            }
            string id = ID;

            if (string.IsNullOrEmpty(id))
            {
                return;
            }
            UCSettlementAddOrEdit view = new UCSettlementAddOrEdit(WindowStatus.View, id, this);

            base.addUserControl(view, "结算方式-预览", "UCSettlementView" + id, this.Tag.ToString(), this.Name);
        }
예제 #4
0
        void EditData(WindowStatus status)
        {
            if (status != WindowStatus.Edit && status != WindowStatus.Copy)
            {
                return;
            }
            string title = "编辑";
            string menuId = "UCSettlementEdit";
            if (status == WindowStatus.Copy)
            {
                title = "复制";
                menuId = "UCSettlementCopy";
            }

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

            UCSettlementAddOrEdit uc = new UCSettlementAddOrEdit(status, id, this);
            uc.RefreshDataStart -= new UCSettlementAddOrEdit.RefreshData(this.BindData);
            uc.RefreshDataStart += new UCSettlementAddOrEdit.RefreshData(this.BindData);
            base.addUserControl(uc, string.Format("结算方式-{0}", title), menuId + id, this.Tag.ToString(), this.Name);
        }
예제 #5
0
 void UCSettlementManage_AddEvent(object sender, EventArgs e)
 {
     UCSettlementAddOrEdit uc = new UCSettlementAddOrEdit(WindowStatus.Add, null, this);
     uc.RefreshDataStart -= new UCSettlementAddOrEdit.RefreshData(this.BindData);
     uc.RefreshDataStart += new UCSettlementAddOrEdit.RefreshData(this.BindData);
     this.addUserControl(uc, "结算方式-新建", "UCSettlementAdd", this.Tag.ToString(), this.Name);
 }
예제 #6
0
 void ViewData()
 {
     if (dgvRecord.CurrentRow == null)
     {
         MessageBoxEx.Show("请选择要预览的数据!");
         return;
     }
     string id = ID;
     if (string.IsNullOrEmpty(id))
     {
         return;
     }
     UCSettlementAddOrEdit view = new UCSettlementAddOrEdit(WindowStatus.View, id, this);           
     base.addUserControl(view, "结算方式-预览", "UCSettlementView" + id, this.Tag.ToString(), this.Name);
 }