示例#1
0
        private void AddBindings()
        {
            AddBinding(tboxDocNumber, "DocNumber");
            AddBinding(pickDocDate, "DocDate");
            AddBinding(tboxPerson, "Person");
            AddBinding(tboxVehicleMark, "VehicleMark");
            AddBinding(tboxLicensePlate, "LicensePlate");
            AddBinding(tboxBaseDocument, "BaseDocument");
            AddBinding(tboxBaseDocNumber, "BaseDocNumber");
            AddBinding(pickBaseDocDate, "BaseDocDate");
            AddBinding(tboxComment, "Comment");

            bsItemList.DataSource = Document.GetItemList(Database);

            if (Document.PermitId != 0)
            {
                Permit permit = Permit.Load(Database, Document.PermitId);
                tboxPermit.Text = permit.ToString();

                btnFindPermit.Text = permit.ToString();
            }
        }
 public Permit GetPermit(EPVDatabase database)
 {
     return(Permit.Load(database, permitId));
 }
        private void LoadPermit(int permitId)
        {
            Permit permit = Permit.Load(Database, permitId);

            tboxPermit.Text = permit.ToString();
        }