private void InitializeFormControls()
        {
            // Dependency
            DependencyParameters pmtDependency = new DependencyParameters();

            pmtDependency.BidderId = ParameterConstants.IntDefault;
            IList <Dependency> lstDependencies =
                srvDependency.GetListByParameters(pmtDependency);

            WindowsFormsUtil.LoadCombo <Dependency>(this.frmEndUser.uceSchDependency,
                                                    lstDependencies, "DependencyId", "Name", "Seleccione");
            WindowsFormsUtil.LoadCombo <Dependency>(this.frmEndUser.uceDetDependency,
                                                    lstDependencies, "DependencyId", "Name", "Seleccione");

            this.frmEndUser.btnSchEdit.Click   += new EventHandler(btnSchEdit_Click);
            this.frmEndUser.btnSchSearch.Click += new EventHandler(btnSchSearch_Click);
            this.frmEndUser.btnSchCreate.Click += new EventHandler(btnSchCreate_Click);
            this.frmEndUser.btnDetSave.Click   += new EventHandler(btnDetSave_Click);
            this.frmEndUser.btnDetCancel.Click += new EventHandler(btnDetCancel_Click);
            this.frmEndUser.btnSchClear.Click  += new EventHandler(btnSchClear_Click);
            this.frmEndUser.btnSchDelete.Click += new EventHandler(this.btnSchDelete_Click);

            this.frmEndUser.HiddenDetail(true);
            this.ClearSearchControls();
        }
Exemplo n.º 2
0
        private void InitializeFormControls()
        {
            // OperativeSystemType
            OperativeSystemTypeParameters pmtOperativeSystemType = new OperativeSystemTypeParameters();

            pmtOperativeSystemType.OperativeSystemTypeId = ParameterConstants.IntDefault;
            IList <OperativeSystemType> lstDependencies =
                srvOperativeSystemType.GetListByParameters(pmtOperativeSystemType);

            WindowsFormsUtil.LoadCombo <OperativeSystemType>(this.frmOperativeSystem.uceSchOperativeSystemType,
                                                             lstDependencies, "OperativeSystemTypeId", "Name", "Seleccione", false);
            WindowsFormsUtil.LoadCombo <OperativeSystemType>(this.frmOperativeSystem.uceDetOperativeSystemType,
                                                             lstDependencies, "OperativeSystemTypeId", "Name", "Seleccione", false);

            this.frmOperativeSystem.btnSchEdit.Click   += new EventHandler(btnSchEdit_Click);
            this.frmOperativeSystem.btnSchSearch.Click += new EventHandler(btnSchSearch_Click);
            this.frmOperativeSystem.btnSchCreate.Click += new EventHandler(btnSchCreate_Click);
            this.frmOperativeSystem.btnDetSave.Click   += new EventHandler(btnDetSave_Click);
            this.frmOperativeSystem.btnDetCancel.Click += new EventHandler(btnDetCancel_Click);
            this.frmOperativeSystem.btnSchClear.Click  += new EventHandler(btnSchClear_Click);
            this.frmOperativeSystem.btnSchDelete.Click += new EventHandler(this.btnSchDelete_Click);

            this.frmOperativeSystem.HiddenDetail(true);
            this.ClearSearchControls();
        }
        private void RefreshCombo()
        {
            IList <T> entityList = (this.service as BaseReadOnlyService <T, TId, TDao, TPmt>)
                                   .GetListByParameters(this.Parameters);

            this.suceEntities.DataSource = null;
            WindowsFormsUtil.LoadCombo <T>(this.suceEntities, entityList, this.ValueMember,
                                           this.DisplayMember, "Seleccione", this.controlType == SamsaraEntityChooserControlTypeEnum.Multiple);
        }
        public override void InitializeDetailFormControls()
        {
            this.frmCommissionPayment.sccDetStaff.ControlType   = SamsaraEntityChooserControlTypeEnum.Multiple;
            this.frmCommissionPayment.sccDetStaff.DisplayMember = "Fullname";
            this.frmCommissionPayment.sccDetStaff.Refresh();

            WindowsFormsUtil.LoadCombo(this.frmCommissionPayment.uceDetMonth,
                                       TimeUtil.Months, "Index", "Name", "Seleccione", false);
        }
        private void uceDetDependency_ValueChanged(object sender, EventArgs e)
        {
            EndUserParameters pmtEndUser = new EndUserParameters();

            pmtEndUser.DependencyId = Convert.ToInt32(this.frmOpportunity.uceDetDependency.Value);
            IList <EndUser> lstEndUsers = srvEndUser.GetListByParameters(pmtEndUser);

            WindowsFormsUtil.LoadCombo <EndUser>(this.frmOpportunity.uceDetEndUser,
                                                 lstEndUsers, "EndUserId", "Name", "Seleccione");
        }
        private void uceDetBidder_ValueChanged(object sender, EventArgs e)
        {
            DependencyParameters pmtDependency = new DependencyParameters();

            pmtDependency.BidderId = Convert.ToInt32(this.frmOpportunity.uceDetBidder.Value);
            IList <Dependency> lstDependencies = srvDependency.GetListByParameters(pmtDependency);

            WindowsFormsUtil.LoadCombo <Dependency>(this.frmOpportunity.uceDetDependency,
                                                    lstDependencies, "DependencyId", "Name", "Seleccione");
        }
Exemplo n.º 7
0
        private void InitializeFormControls()
        {
            // Bidder
            BidderParameters pmtBidder  = new BidderParameters();
            IList <Bidder>   lstBidders = srvBidder.GetListByParameters(pmtBidder);

            WindowsFormsUtil.LoadCombo <Bidder>(this.frmDependency.uceSchBidder,
                                                lstBidders, "BidderId", "Name", "Seleccione");
            WindowsFormsUtil.LoadCombo <Bidder>(this.frmDependency.uceDetBidder,
                                                lstBidders, "BidderId", "Name", "Seleccione");

            this.frmDependency.btnSchEdit.Click   += new EventHandler(btnSchEdit_Click);
            this.frmDependency.btnSchSearch.Click += new EventHandler(btnSchSearch_Click);
            this.frmDependency.btnSchCreate.Click += new EventHandler(btnSchCreate_Click);
            this.frmDependency.btnDetSave.Click   += new EventHandler(btnDetSave_Click);
            this.frmDependency.btnDetCancel.Click += new EventHandler(btnDetCancel_Click);
            this.frmDependency.btnSchClear.Click  += new EventHandler(btnSchClear_Click);
            this.frmDependency.btnSchDelete.Click += new EventHandler(this.btnSchDelete_Click);

            this.frmDependency.HiddenDetail(true);
            this.ClearSearchControls();
        }
        private void InitializeFormControls()
        {
            // BidderType
            BidderTypeParameters pmtBidderType  = new BidderTypeParameters();
            IList <BidderType>   lstBidderTypes = srvBidderType.GetListByParameters(pmtBidderType);

            WindowsFormsUtil.LoadCombo <BidderType>(this.frmBidder.uceSchType,
                                                    lstBidderTypes, "BidderTypeId", "Name", "Seleccione");
            WindowsFormsUtil.LoadCombo <BidderType>(this.frmBidder.uceDetType,
                                                    lstBidderTypes, "BidderTypeId", "Name", "Seleccione");

            this.frmBidder.btnSchEdit.Click   += new EventHandler(btnSchEdit_Click);
            this.frmBidder.btnSchSearch.Click += new EventHandler(btnSchSearch_Click);
            this.frmBidder.btnSchCreate.Click += new EventHandler(btnSchCreate_Click);
            this.frmBidder.btnDetSave.Click   += new EventHandler(btnDetSave_Click);
            this.frmBidder.btnDetCancel.Click += new EventHandler(btnDetCancel_Click);
            this.frmBidder.btnSchClear.Click  += new EventHandler(btnSchClear_Click);
            this.frmBidder.btnSchDelete.Click += new EventHandler(this.btnSchDelete_Click);

            this.frmBidder.HiddenDetail(true);
            this.ClearSearchControls();
        }
        private void InitializeFormControls()
        {
            // OpportunityType
            OpportunityTypeParameters pmtOpportunityType = new OpportunityTypeParameters();
            IList <OpportunityType>   lstOpportunityType =
                this.srvOpportunityType.GetListByParameters(pmtOpportunityType);

            WindowsFormsUtil.LoadCombo <OpportunityType>(this.frmOpportunity.uceSchOpportunityType,
                                                         lstOpportunityType, "OpportunityTypeId", "Name", "Seleccione");
            WindowsFormsUtil.LoadCombo <OpportunityType>(this.frmOpportunity.uceDetOpportunityType,
                                                         lstOpportunityType, "OpportunityTypeId", "Name", "Seleccione");

            this.frmOpportunity.uceDetOpportunityType.ValueChanged +=
                new EventHandler(uceDetOpportunityType_ValueChanged);
            this.frmOpportunity.uceSchOpportunityType.ValueChanged +=
                new EventHandler(uceSchOpportunityType_ValueChanged);

            this.uceDetOpportunityType_ValueChanged(null, null);
            this.uceSchOpportunityType_ValueChanged(null, null);

            // Bidder
            BidderParameters pmtBidder  = new BidderParameters();
            IList <Bidder>   lstBidders = srvBidder.GetListByParameters(pmtBidder);

            WindowsFormsUtil.LoadCombo <Bidder>(this.frmOpportunity.uceSchBidder,
                                                lstBidders, "BidderId", "Name", "Seleccione");
            WindowsFormsUtil.LoadCombo <Bidder>(this.frmOpportunity.uceDetBidder,
                                                lstBidders, "BidderId", "Name", "Seleccione");

            this.frmOpportunity.uceSchBidder.ValueChanged += new EventHandler(uceSchBidder_ValueChanged);
            this.frmOpportunity.uceDetBidder.ValueChanged += new EventHandler(uceDetBidder_ValueChanged);

            // Dependency
            DependencyParameters pmtDependency = new DependencyParameters();

            pmtDependency.BidderId = ParameterConstants.IntNone;
            IList <Dependency> lstDependencies = srvDependency.GetListByParameters(pmtDependency);

            WindowsFormsUtil.LoadCombo <Dependency>(this.frmOpportunity.uceSchDependency,
                                                    lstDependencies, "DependencyId", "Name", "Seleccione");
            WindowsFormsUtil.LoadCombo <Dependency>(this.frmOpportunity.uceDetDependency,
                                                    lstDependencies, "DependencyId", "Name", "Seleccione");

            this.frmOpportunity.uceSchDependency.ValueChanged += new EventHandler(uceSchDependency_ValueChanged);
            this.frmOpportunity.uceDetDependency.ValueChanged += new EventHandler(uceDetDependency_ValueChanged);

            // EndUser
            EndUserParameters pmtEndUser = new EndUserParameters();

            pmtEndUser.DependencyId = ParameterConstants.IntNone;
            IList <EndUser> lstEndUsers = srvEndUser.GetListByParameters(pmtEndUser);

            WindowsFormsUtil.LoadCombo <EndUser>(this.frmOpportunity.uceSchEndUser,
                                                 lstEndUsers, "EndUserId", "Name", "Seleccione");
            WindowsFormsUtil.LoadCombo <EndUser>(this.frmOpportunity.uceDetEndUser,
                                                 lstEndUsers, "EndUserId", "Name", "Seleccione");

            // Asesor
            AsesorParameters pmtAsesor  = new AsesorParameters();
            IList <Asesor>   lstAsesors = srvAsesor.GetListByParameters(pmtAsesor);

            WindowsFormsUtil.LoadCombo <Asesor>(this.frmOpportunity.uceSchAsesor,
                                                lstAsesors, "AsesorId", "Name", "Seleccione");
            WindowsFormsUtil.LoadCombo <Asesor>(this.frmOpportunity.uceDetAsesor,
                                                lstAsesors, "AsesorId", "Name", "Seleccione");

            // OpportunityStatus
            OpportunityStatusParameters pmtOpportunityStatus   = new OpportunityStatusParameters();
            IList <OpportunityStatus>   lstOpportunityStatuses =
                srvOpportunityStatus.GetListByParameters(pmtOpportunityStatus);

            WindowsFormsUtil.LoadCombo <OpportunityStatus>(this.frmOpportunity.uceSchOpportunityStatus,
                                                           lstOpportunityStatuses, "OpportunityStatusId", "Name", "Seleccione");
            WindowsFormsUtil.LoadCombo <OpportunityStatus>(this.frmOpportunity.uceDetOpportunityStatus,
                                                           lstOpportunityStatuses, "OpportunityStatusId", "Name", "Seleccione");

            // Organization
            OrganizationParameters pmtOrganization  = new OrganizationParameters();
            IList <Organization>   lstOrganizations = srvOrganization.GetListByParameters(pmtOrganization);

            WindowsFormsUtil.LoadCombo <Organization>(this.frmOpportunity.uceSchOrganization,
                                                      lstOrganizations, "OrganizationId", "Name", "Seleccione");
            WindowsFormsUtil.LoadCombo <Organization>(this.frmOpportunity.uceDetOrganization,
                                                      lstOrganizations, "OrganizationId", "Name", "Seleccione");

            //grdDetLog
            this.frmOpportunity.grdDetLog.InitializeLayout
                += new InitializeLayoutEventHandler(grdDetLog_InitializeLayout);
            this.frmOpportunity.grdDetLog.BeforeCellUpdate
                += new BeforeCellUpdateEventHandler(grdDetLog_BeforeCellUpdate);
            OpportunityLogParameters pmtOpportunityLog = new OpportunityLogParameters();

            pmtOpportunityLog.OpportunityLogId = ParameterConstants.IntNone;
            this.dtOpportunityLog = this.srvOpportunityLog.SearchByParameters(pmtOpportunityLog);
            this.frmOpportunity.grdDetLog.DataSource = null;
            this.frmOpportunity.grdDetLog.DataSource = this.dtOpportunityLog;

            this.frmOpportunity.btnSchEdit.Click            += new EventHandler(btnSchEdit_Click);
            this.frmOpportunity.btnSchSearch.Click          += new EventHandler(btnSchSearch_Click);
            this.frmOpportunity.btnSchCreate.Click          += new EventHandler(btnSchCreate_Click);
            this.frmOpportunity.btnDetSave.Click            += new EventHandler(btnDetSave_Click);
            this.frmOpportunity.btnDetCancel.Click          += new EventHandler(btnDetCancel_Click);
            this.frmOpportunity.btnSchDelete.Click          += new EventHandler(this.btnSchDelete_Click);
            this.frmOpportunity.btnSchClear.Click           += new EventHandler(btnSchClear_Click);
            this.frmOpportunity.ubtnDetGenerateTender.Click += new EventHandler(ubtnDetGenerateTender_Click);
            this.frmOpportunity.ubtnDetCreateLog.Click      += new EventHandler(ubtnDetCreateLog_Click);

            this.hiddenOpportunityDetailTab       = this.frmOpportunity.tabDetDetail.TabPages["OpportunityDetails"];
            this.frmOpportunity.uosSchDates.Value = -1;
            this.frmOpportunity.HiddenDetail(true);

            this.ClearSearchControls();
        }