示例#1
0
        private DataSet GetSelfBillJobData()
        {
            Facade.IJob facJob = new Facade.Job();

            int clientId = cboClient.SelectedValue == "" ? 0 : Convert.ToInt32(cboClient.SelectedValue);

            DateTime startDate = Convert.ToDateTime(dteStartDate.SelectedDate.Value);

            DateTime endDate = Convert.ToDateTime(dteEndDate.SelectedDate.Value);

            if (startDate != DateTime.MinValue || endDate != DateTime.MinValue)
            {
                dsJob = facJob.GetSelfBillJobswithParamsAndDate(clientId, startDate, endDate);
            }
            else
            {
                if (clientId == 0)
                {
                    dsJob = facJob.GetSelfBillJobs();
                }
                else
                {
                    dsJob = facJob.GetSelfBillJobswithParams(clientId);
                }
            }

            return(dsJob);
        }
示例#2
0
        private void performSearch()
        {
            Facade.IJob facJob = new Facade.Job();

            int clientId = cboClient.SelectedValue == "" ? 0 : Convert.ToInt32(cboClient.SelectedValue);

            DateTime startDate = dteStartDate.SelectedDate.Value;

            DateTime endDate = dteEndDate.SelectedDate.Value;

            if (startDate != DateTime.MinValue || endDate != DateTime.MinValue)
            {
                dsJob = facJob.GetSelfBillJobswithParamsAndDate(clientId, startDate, endDate);
            }
            else
            {
                if (clientId == 0)
                {
                    dsJob = facJob.GetSelfBillJobs();
                }
                else
                {
                    dsJob = facJob.GetSelfBillJobswithParams(clientId);
                }
            }

            dgJob.DataSource = dsJob;

            ViewState[C_JobDATA_VS] = dsJob;

            dgJob.DataBind();
        }