Beispiel #1
0
        private void dataGridView1_SelectionChanged(object sender, EventArgs e)
        {
            if (dataGridView1 == null || dataGridView1.Rows.Count < 0 || dataGridView1.CurrentRow == null)
            {
            }
            DataGridView    view = (DataGridView)sender;
            DataGridViewRow row  = view.CurrentRow;

            if (row.Index < 0 || row == null)
            {
                return;
            }
            if (row != null && row.Index != -1 && row != currRow)
            {
                currRow = row;
                DataRowView ranking = (DataRowView)dataGridView1.CurrentRow.DataBoundItem;
                if (RowSelected != null)
                {
                    GetCostumeInvoicingPara tempPara = new GetCostumeInvoicingPara();
                    ReflectionHelper.CopyProperty(pagePara, tempPara);


                    tempPara.CostumeID = ranking["CostumeID"].ToString();
                    this.skinSplitContainer1.Panel2Collapsed = false;
                    RowSelected.Invoke(ranking, tempPara, this.skinSplitContainer1.Panel2);
                }
            }
        }
Beispiel #2
0
        private void BaseButton_Search_Click(object sender, EventArgs e)
        {
            CommonGlobalUtil.Debug("开始查询");
            try
            {
                if (CommonGlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }
                Brand curBrand   = this.skinComboBox_Brand.SelectedItem;
                int   curBrandID = -2;
                if (curBrand == null)
                {
                    curBrandID = -2;
                }
                else
                {
                    curBrandID = curBrand.AutoID;
                }
                this.pagePara = new GetCostumeInvoicingPara()
                {
                    ClassID     = skinComboBoxBigClass.SelectedValue.ClassID,
                    StartDate   = new CJBasic.Date(this.dateTimePicker_Start.Value),
                    EndDate     = new CJBasic.Date(this.dateTimePicker_End.Value),
                    CostumeID   = this.skinTextBox_costumeID.Text,
                    BrandID     = curBrandID,
                    ChooseColor = skinCheckBoxColor.Checked,
                    ChooseSize  = skinCheckBoxSizeName.Checked,

                    Season = ((ListItem <String>) this.skinComboBoxSeason.skinComboBox.SelectedItem).Value,
                };

                //找到对应的大类
                // pagePara.ClassID = GetBigClass( pagePara.ClassID);
                DateTime startTime = DateTime.Now;
                InteractResult <List <CostumeInvoicing> > listPage = GlobalCache.ServerProxy.GetCostumeInvoicing(this.pagePara);
                DateTime endTime = DateTime.Now;
                TimeSpan span    = (TimeSpan)(endTime - startTime);
                WriteLog("数据加载开始时间:" + startTime + " 结束时间:" + endTime + " 总耗时数:" + span.TotalSeconds + "秒");
                startTime = DateTime.Now;

                SetSpanInfo();
                endTime = DateTime.Now;
                span    = (TimeSpan)(endTime - startTime);
                WriteLog("表头列设置加载开始时间:" + startTime + " 结束时间:" + endTime + " 总耗时数:" + span.TotalSeconds + "秒");


                this.BindingCostumeStoreDataSource(listPage.Data);
                endTime = DateTime.Now;
                span    = (TimeSpan)(endTime - startTime);
                WriteLog("总界面加载开始时间:" + startTime + " 结束时间:" + endTime + " 总耗时数:" + span.TotalSeconds + "秒");
            }
            catch (Exception ee)
            {
                ShowError(ee);
            }
            finally
            {
                UnLockPage();
            }
            CommonGlobalUtil.Debug("结束查询");
        }