コード例 #1
0
        private void SaveMerhcandisingGroupCustomLink()
        {
            MerchandisingGroupCustomLink.DeleteMerchandisingGroupCustomLinkByMerchandisingGroupCustomId(this.merchandisingGroupCustomId);
            MerchandisingGroupCustomLink merchandisingGroupCustomLink = null;

            foreach (GridViewRow gridViewRow in GridViewResult.Rows)
            {
                merchandisingGroupCustomLink = new MerchandisingGroupCustomLink();
                HiddenField hiddenFieldStoreCategoryId = (HiddenField)gridViewRow.Cells[0].FindControl("HiddenFieldStoreCategoryId");
                CheckBox    checkBoxLink = (CheckBox)gridViewRow.Cells[5].FindControl("CheckBoxStoreCategoryLink");

                if (checkBoxLink.Checked)
                {
                    merchandisingGroupCustomLink.MerchandisingGroupCustomId = this.merchandisingGroupCustomId;
                    merchandisingGroupCustomLink.StoreCategoryId            = Convert.ToInt32(hiddenFieldStoreCategoryId.Value);
                    merchandisingGroupCustomLink.ModifiedUser = this.Master.LoggedOnAccount;
                    merchandisingGroupCustomLink.Save();
                }
            }
        }
コード例 #2
0
        protected void GridViewResult_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            GridViewRow currentRow = e.Row;

            if (currentRow.RowIndex == 0)
            {
                previousGridViewResult = (Object)currentRow.DataItem;
            }

            if (currentRow.RowIndex > 0)
            {
                //if (this.storeId > 0)
                //{
                MerchandisingGroupCustomLink previousStoreCategory = (MerchandisingGroupCustomLink)previousGridViewResult;
                MerchandisingGroupCustomLink currentStoreCategory  = (MerchandisingGroupCustomLink)currentRow.DataItem;

                if (previousStoreCategory.StoreCategoryGroup == currentStoreCategory.StoreCategoryGroup)
                {
                    currentRow.Cells[3].ForeColor = System.Drawing.Color.White;
                    currentRow.Cells[2].Text      = String.Empty;
                }

                previousGridViewResult = (Object)currentStoreCategory;
                //}
                //else
                //{
                //    EmployeeStoreCategory previousStoreCategory = (EmployeeStoreCategory)previousGridViewResult;
                //    EmployeeStoreCategory currentStoreCategory = (EmployeeStoreCategory)currentRow.DataItem;

                //    if (previousStoreCategory.StoreCategoryGroup == currentStoreCategory.StoreCategoryGroup)
                //    {
                //        currentRow.Cells[3].ForeColor = System.Drawing.Color.White;
                //        currentRow.Cells[2].Text = String.Empty;
                //    }

                //    previousGridViewResult = (Object)currentStoreCategory;
                //}
            }
        }
コード例 #3
0
 private void BindGridViewResult()
 {
     GridViewResult.DataSource = MerchandisingGroupCustomLink.GetMerchandisingGroupCustomLinkListByMerchandisingGroupCustomId(this.merchandisingGroupCustomId);
     GridViewResult.DataBind();
 }