Beispiel #1
0
        private void dataGridViewPagingSumCtrl_CurrentPageIndexChanged(int index)
        {
            try
            {
                if (this.pagePara == null)
                {
                    return;
                }
                if (GlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }
                pagePara.PageIndex = index;
                CostumeListPage listPage = GlobalCache.ServerProxy.GetCostumeListPage(this.pagePara);

                this.BindingDataSource(listPage);
            }
            catch (Exception ee)
            {
                GlobalUtil.ShowError(ee);
            }
            finally
            {
                GlobalUtil.UnLockPage(this);
            }
        }
        private void BindingDataSource(CostumeListPage listPage)
        {
            this.SetOtherValue(listPage.CostumeList);
            this.queryResults = listPage.CostumeList;

            dataGridViewPagingSumCtrl.BindingDataSource(listPage?.CostumeList, null, listPage?.TotalEntityCount);
            //      this.dataGridViewQueryResults.DataSource = listPage.CostumeList;
            //  this.dataGridViewQueryResults.Refresh();
        }
        private void BaseButton_Search_Click(object sender, EventArgs e)
        {
            try
            {
                if (CommonGlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }

                this.pagePara = new CostumeListPagePara();

                this.pagePara.PageIndex = 0;
                this.pagePara.PageSize  = this.dataGridViewPagingSumCtrl.PageSize;
                this.pagePara.CostumeID = this.costumeTextBox1.SkinTxt.Text;

                if (((ListItem <String>) this.skinComboBoxSeason.SelectedItem).Value != null)
                {
                    this.pagePara.Season = ((ListItem <String>) this.skinComboBoxSeason.SelectedItem).Key;
                }


                this.pagePara.BrandID = (this.skinComboBox_Brand.SelectedValue != null && int.Parse(this.skinComboBox_Brand.SelectedValue.ToString()) != -1) ? int.Parse(this.skinComboBox_Brand.SelectedValue.ToString()) : -1;


                this.pagePara.ClassID = this.skinComboBoxBigClass.SelectedValue.ClassID;
                //    this.pagePara.SubSmallClass = this.skinComboBoxBigClass.SelectedValue?.SubSmallClass;
                this.pagePara.SupplierID = this.skinComboBoxSupplierID.SelectedValue != null?this.skinComboBoxSupplierID.SelectedValue.ToString() : null;

                this.pagePara.Models = this.skinComboBoxModels.SelectedValue != null?this.skinComboBoxModels.SelectedValue.ToString() : null;

                if (this.skinComboBoxYear.SelectedValue != null)
                {
                    String year = this.skinComboBoxYear.SelectedValue.ToString();


                    if (!String.IsNullOrEmpty(year))
                    {
                        this.pagePara.Year = int.Parse(year);
                    }
                }
                this.pagePara.Style = this.skinComboBoxStyle.SelectedValue != null?this.skinComboBoxStyle.SelectedValue.ToString() : null;

                this.pagePara.IsQueryValid = IsQueryValid.True;

                CostumeListPage list = CommonGlobalCache.ServerProxy.GetCostumeListPage(this.pagePara);
                // this.dataGridViewPagingSumCtrl.Initialize(list);
                this.BindingDataSource(list);
            }
            catch (Exception ex)
            {
                CommonGlobalUtil.ShowError(ex);
            }
            finally
            {
                GlobalUtil.UnLockPage(this);
            }
        }
        private void dataGridViewPagingSumCtrl_CurrentPageIndexChanged(int index)
        {
            if (this.pagePara == null)
            {
                return;
            }
            pagePara.PageIndex = index;
            CostumeListPage list = CommonGlobalCache.ServerProxy.GetCostumeListPage(this.pagePara);

            this.BindingDataSource(list);
        }
 private void BindingDataSource(CostumeListPage listPage)
 {
     if (listPage != null && listPage.CostumeList.Count > 0)
     {
         foreach (var item in listPage.CostumeList)
         {
             item.BuyoutPrice = item.Price;
         }
     }
     this.SetOtherValue(listPage.CostumeList);
     this.queryResults = listPage.CostumeList;
     this.dataGridViewPagingSumCtrl.BindingDataSource(listPage?.CostumeList, null, listPage?.TotalEntityCount);
 }
Beispiel #6
0
 private void BindingDataSource(CostumeListPage listPage)
 {
     this.SetOtherValue(listPage.CostumeList);
     dataGridViewPagingSumCtrl.BindingDataSource(listPage?.CostumeList, null, listPage?.TotalEntityCount);
 }
Beispiel #7
0
        private void BaseButton_Search_Click(object sender, EventArgs e)
        {
            try
            {
                if (GlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }

                this.skinCheckBoxShowImage.Checked = false;
                this.pagePara.PageIndex            = 0;
                this.pagePara.PageSize             = this.dataGridViewPagingSumCtrl.PageSize;
                this.pagePara.CostumeID            = this.skinTextBoxID.SkinTxt.Text;
                this.pagePara.Season  = ((ListItem <String>) this.skinComboBoxSeason.skinComboBox.SelectedItem).Value;
                this.pagePara.BrandID = (this.skinComboBox_Brand.SelectedValue != null && int.Parse(this.skinComboBox_Brand.SelectedValue.ToString()) != -1) ? int.Parse(this.skinComboBox_Brand.SelectedValue.ToString()) : -1;
                this.pagePara.ClassID = skinComboBoxBigClass.SelectedValue.ClassID;
                //this.pagePara.SubSmallClass = this.skinComboBoxBigClass.SelectedValue?.SubSmallClass;
                this.pagePara.SupplierID = this.skinComboBoxSupplierID.SelectedValue != null?this.skinComboBoxSupplierID.SelectedValue.ToString() : null;

                //   this.pagePara.Models = this.skinComboBoxModels.SelectedValue != null ? this.skinComboBoxModels.SelectedValue.ToString() : null;
                this.pagePara.Property   = (CostumeProperty)this.skinCmbProperty.SelectedValue;
                this.pagePara.StartDate  = new Date(dateTimePicker_Start.Value);
                this.pagePara.EndDate    = new Date(dateTimePicker_End.Value);
                this.pagePara.IsOpenTime = true;

                if (this.skinComboBoxYear.SelectedValue != null)
                {
                    String year = this.skinComboBoxYear.SelectedValue.ToString();
                    if (!String.IsNullOrEmpty(year))
                    {
                        this.pagePara.Year = int.Parse(year);
                    }
                }
                //  this.pagePara.Style = this.skinComboBoxStyle.SelectedValue != null ? this.skinComboBoxStyle.SelectedValue.ToString() : null;

                /* if (skinCheckBoxOnlyDisable.Checked)
                 * {
                 *   this.pagePara.IsQueryValid = IsQueryValid.False;
                 * }
                 * else
                 * {
                 *   this.pagePara.IsQueryValid = IsQueryValid.All;
                 * }
                 */
                if (this.skinComboBox_State.SelectedValue.ToString() == IsQueryValid.True.ToString())
                {
                    this.pagePara.IsQueryValid = IsQueryValid.True;
                    //  this.DeleteColumn.Visible = false;
                }
                else if (this.skinComboBox_State.SelectedValue.ToString() == IsQueryValid.False.ToString())
                {
                    this.pagePara.IsQueryValid = IsQueryValid.False;
                }
                else
                {
                    this.pagePara.IsQueryValid = IsQueryValid.All;
                }

                CostumeListPage listPage = GlobalCache.ServerProxy.GetCostumeListPage(this.pagePara);
                changeDisplay();

                /*   if (skinCheckBoxOnlyDisable.Checked)
                 * {
                 *     Column3.Visible = true;
                 *     Column2.Visible = false;
                 * }
                 * else
                 * {
                 *     Column3.Visible = false;
                 *     Column2.Visible = true;
                 * }*/
                this.dataGridViewPagingSumCtrl.Initialize(listPage);
                dataGridViewPagingSumCtrl.OrderPara = pagePara;
                this.BindingDataSource(listPage);
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
            finally
            {
                GlobalUtil.UnLockPage(this);
            }
        }