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);
            }
        }
Example #2
0
 private void CostumeManageCtrl_Load(object sender, EventArgs e)
 {
     try
     {
         dataGridView1.DataSource = null;
         pagePara           = new CostumeListPagePara();
         skinTextBoxID.Text = string.Empty;
         CommonGlobalUtil.SetBrand(this.skinComboBox_Brand);
         CommonGlobalUtil.SetYear(skinComboBoxYear);
         //  CommonGlobalUtil.SetSupplier(skinComboBoxSupplierID);
         setProperty();
     }
     catch (Exception ex)
     {
         GlobalUtil.ShowError(ex);
     }
 }