private void InitializeFormControls()
        {
            // Bidder
            BidderParameters pmtBidder = new BidderParameters();

            this.frmDependency.bccDetBidder.Parameters    = pmtBidder;
            this.frmDependency.bccDetBidder.ValueMember   = "BidderId";
            this.frmDependency.bccDetBidder.DisplayMember = "Name";
            this.frmDependency.bccDetBidder.Refresh();

            this.frmDependency.bccSchBidder.Parameters    = pmtBidder;
            this.frmDependency.bccSchBidder.ValueMember   = "BidderId";
            this.frmDependency.bccSchBidder.DisplayMember = "Name";
            this.frmDependency.bccSchBidder.Refresh();

            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 Search()
        {
            BidderParameters pmtBidder = new BidderParameters();

            pmtBidder.Name         = "%" + this.frmBidder.txtSchName.Text + "%";
            pmtBidder.BidderTypeId = (int)this.frmBidder.uceSchType.Value;

            DataTable dtBidders = srvBidder.SearchByParameters(pmtBidder);

            this.frmBidder.grdSchSearch.DataSource = null;
            this.frmBidder.grdSchSearch.DataSource = dtBidders;
        }
示例#3
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();
        }
示例#4
0
        private void InitializeFormControls()
        {
            // OpportunityType
            OpportunityTypeParameters pmtOpportunityType = new OpportunityTypeParameters();

            this.frmOpportunity.otcSchOpportunityType.Parameters = pmtOpportunityType;
            this.frmOpportunity.otcSchOpportunityType.Refresh();

            this.frmOpportunity.otcDetOpportunityType.Parameters = pmtOpportunityType;
            this.frmOpportunity.otcDetOpportunityType.Refresh();

            this.frmOpportunity.otcDetOpportunityType.ValueChanged +=
                new SamsaraEntityChooserValueChangedEventHandler <OpportunityType>(otcDetOpportunityType_ValueChanged);
            this.frmOpportunity.otcSchOpportunityType.ValueChanged
                += new SamsaraEntityChooserValueChangedEventHandler <OpportunityType>(otcSchOpportunityType_ValueChanged);

            this.otcDetOpportunityType_ValueChanged(null, null);
            this.otcSchOpportunityType_ValueChanged(null, null);

            // Bidder
            BidderParameters pmtBidder = new BidderParameters();

            this.frmOpportunity.bcDetBidder.Parameters = pmtBidder;
            this.frmOpportunity.bcDetBidder.Refresh();

            this.frmOpportunity.bcSchBidder.Parameters = pmtBidder;
            this.frmOpportunity.bcSchBidder.Refresh();

            this.frmOpportunity.bcSchBidder.ValueChanged
                += new SamsaraEntityChooserValueChangedEventHandler <Bidder>(bcSchBidder_ValueChanged);
            this.frmOpportunity.bcDetBidder.ValueChanged
                += new SamsaraEntityChooserValueChangedEventHandler <Bidder>(bcDetBidder_ValueChanged);

            // Dependency
            DependencyParameters pmtDependency = new DependencyParameters();

            pmtDependency.BidderId = ParameterConstants.IntNone;

            this.frmOpportunity.dcSchDependency.Parameters = pmtDependency;
            this.frmOpportunity.dcSchDependency.Refresh();

            this.frmOpportunity.dcDetDependency.Parameters = pmtDependency;
            this.frmOpportunity.dcDetDependency.Refresh();

            this.frmOpportunity.dcSchDependency.ValueChanged
                += new SamsaraEntityChooserValueChangedEventHandler <Dependency>(dcSchDependency_ValueChanged);
            this.frmOpportunity.dcDetDependency.ValueChanged
                += new SamsaraEntityChooserValueChangedEventHandler <Dependency>(dcDetDependency_ValueChanged);

            // EndUser
            EndUserParameters pmtEndUser = new EndUserParameters();

            pmtEndUser.DependencyId = ParameterConstants.IntNone;

            this.frmOpportunity.eucSchEndUser.Parameters = pmtEndUser;
            this.frmOpportunity.eucSchEndUser.Refresh();

            this.frmOpportunity.eucDetEndUser.Parameters = pmtEndUser;
            this.frmOpportunity.eucDetEndUser.Refresh();

            // Asesor
            AsesorParameters pmtAsesor = new AsesorParameters();

            this.frmOpportunity.acDetAsesor.Parameters = pmtAsesor;
            this.frmOpportunity.acDetAsesor.Refresh();

            this.frmOpportunity.acSchAsesor.Parameters = pmtAsesor;
            this.frmOpportunity.acSchAsesor.Refresh();

            // OpportunityStatus
            OpportunityStatusParameters pmtOpportunityStatus = new OpportunityStatusParameters();

            this.frmOpportunity.osDetOpportunityStatus.Parameters = pmtOpportunityStatus;
            this.frmOpportunity.osDetOpportunityStatus.Refresh();

            this.frmOpportunity.oscSchOpportunityStatus.Parameters = pmtOpportunityStatus;
            this.frmOpportunity.oscSchOpportunityStatus.Refresh();

            // Organization
            OrganizationParameters pmtOrganization = new OrganizationParameters();

            this.frmOpportunity.ocDetOrganization.Parameters = pmtOrganization;
            this.frmOpportunity.ocDetOrganization.Refresh();

            this.frmOpportunity.ocSchOrganization.Parameters = pmtOrganization;
            this.frmOpportunity.ocSchOrganization.Refresh();

            //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();
        }
        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();
        }