public ServiceForm() { InitializeComponent(); if (DesignMode || (Site != null && Site.DesignMode)) { return; } CntrlCN = DBControllersFactory.Contract(); CntrlCG = DBControllersFactory.BillingCategory(); CntrlCU = DBControllersFactory.Currency(); CntrlVT = DBControllersFactory.VAT(); //template Mapper["Id"] = txtId; Mapper["CreatedBy"] = txtCreatedBy; Mapper["CreatedOn"] = txtCreatedOn; Mapper["UpdatedBy"] = txtUpdatedBy; Mapper["UpdatedOn"] = txtUpdatedOn; Mapper["ReadOnly"] = chkReadOnly; //data Mapper["BillingCategoryId"] = txtBillingCategoryId; Mapper["ContractId"] = txtContractId; Mapper["CurrencyId"] = txtCurrencyId; Mapper["Price"] = txtPrice; Mapper["Expired"] = chkExpired; Mapper["EffectiveFromDate"] = txtEffectiveFromDate; Mapper["VATId"] = txtVATId; //actions SaveButton = btnSave; DeleteButton = btnDelete; NewButton = btnNew; //pick lists PickList[btnPLContract] = txtContractId; PickList[btnPLCurrency] = txtCurrencyId; PickList[btnPLService] = txtId; PickList[btnPLVAT] = txtVATId; }
public ContractForm() { InitializeComponent(); if (DesignMode || (Site != null && Site.DesignMode)) { return; } CntrlCL = DBControllersFactory.Client(); CntrlCG = DBControllersFactory.BillingCategory(); CntrlSR = DBControllersFactory.Service(); CntrlCU = DBControllersFactory.Currency(); CntrlVT = DBControllersFactory.VAT(); //template Mapper["Id"] = txtId; Mapper["CreatedBy"] = txtCreatedBy; Mapper["CreatedOn"] = txtCreatedOn; Mapper["UpdatedBy"] = txtUpdatedBy; Mapper["UpdatedOn"] = txtUpdatedOn; Mapper["ReadOnly"] = chkReadOnly; //data Mapper["ContractCode"] = txtContractCode; Mapper["StartDate"] = txtStartDate; Mapper["EndDate"] = txtEndDate; Mapper["ClientId"] = txtClientId; Mapper["IsActive"] = chkIsActive; Mapper["Conditions"] = txtConditions; //actions SaveButton = btnSave; DeleteButton = btnDelete; NewButton = btnNew; //pick lists PickList[btnPLClient] = txtClientId; PickList[btnPLContract] = txtId; Services = new List <ServiceModel>(); ModelChanged = delegate() { Console.WriteLine("-==================== model changed"); RequeryServicesGrid(); }; }