示例#1
0
        protected override void FormLoad()
        {
            base.FormLoad();
            var customerlst = m_crmclient.getCustomerList();

            lkpcustomer.ExtBindingDataSource <T_Customer>(customerlst, "id", "customername");

            var pUds = DisPlayEnum.getEnumDS(typeof(periodUnit));

            lkpPeriodUnit.ExtBindingDataSource(pUds, "key", "value");

            var rtds = DisPlayEnum.getEnumDS(typeof(receiveType));

            lkpRevType.ExtBindingDataSource(rtds, "key", "value");

            readonlytxtbox(this.Controls, true);

            m_saleorder = m_ssclient.getSaleOrderbyId(m_soid);
            SetData(m_saleorder);
            if (m_saleorder.receivetype == (int)receiveType.产品明细收款)
            {
                m_saleProducts       = m_ssclient.getSaleProductbysoid(m_soid);
                gcRecieve.DataSource = m_saleProducts;
                gcRecieve.MainView   = gvSaledetail;
                //gvSaledetail.RefreshData();
                colpcount.OptionsColumn.AllowEdit      = false;
                colpcode.OptionsColumn.AllowEdit       = false;
                colpname.OptionsColumn.AllowEdit       = false;
                colpspec.OptionsColumn.AllowEdit       = false;
                colpmodelprice.OptionsColumn.AllowEdit = false;
                colpunitprice.OptionsColumn.AllowEdit  = false;
                colptotalprice.OptionsColumn.AllowEdit = false;
                colpcount.OptionsColumn.AllowEdit      = false;
            }
            else
            {
                this.barbtn1.Visibility       = BarItemVisibility.Always;
                this.barbtn1.LargeImageIndex  = 8;
                this.barbtn1.Caption          = "收款登记";
                this.ribbonPageGroup2.Visible = true;
                m_saleRev                      = m_ssclient.getSaleRevbySoid(m_soid);
                gcRecieve.DataSource           = m_saleRev;
                gcRecieve.MainView             = gvSaleRev;
                colsrid.Visible                = false;
                colsoid.Visible                = false;
                coluid.OptionsColumn.AllowEdit = false;
            }
        }