Beispiel #1
0
        /// <summary>
        /// gv_Detail_RowDataBound
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gv_Detail_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                CheckBox CBtemp = GetCellByName(e.Row, "選擇").FindControl("CB_Detail") as CheckBox;
                //展售在途有數不給選---------------
                var 展售 = int.Parse(GetCellByName(e.Row, "展售").Text);
                var 在途 = int.Parse(GetCellByName(e.Row, "在途").Text);
                var 瑕疵 = int.Parse(GetCellByName(e.Row, "瑕疵").Text);

                if (DDL_SearchType.SelectedItem.Text == "庫存銷售")
                {
                    if ((展售 > 0 || 在途 > 0) && !CB_強制勾選.Checked)
                    {
                        CBtemp.Enabled = false;
                    }
                    else
                    {
                        CBtemp.Enabled = true;
                    }
                }
                else if (DDL_SearchType.SelectedItem.Text == "瑕疵" || DDL_SearchType.SelectedItem.Text == "問題件")
                {
                    if (瑕疵 > 0 || CB_強制勾選.Checked)
                    {
                        CBtemp.Enabled = true;
                    }
                    else
                    {
                        CBtemp.Enabled = false;
                    }
                }
                //---------------------------------
            }

            //光棒效果
            GvLightBar.lightbar(e, 3);
        }
Beispiel #2
0
        /// <summary>
        /// 加光棒效果
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gv_logistics_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            try
            {
                e.Row.Cells[0].Width = 200;

                if (e.Row.RowType == DataControlRowType.DataRow)
                {
                    e.Row.Cells[5].ForeColor = System.Drawing.Color.ForestGreen;
                }

                //光棒效果
                //判定row的型態是資料行
                if (e.Row.RowType == DataControlRowType.DataRow)
                {
                    GvLightBar.lightbar(e, 1);
                }
            }
            catch (Exception ex)
            {
                Response.Write("系統發生錯誤 " + ex.Message);
            }
        }
Beispiel #3
0
        /// <summary>
        /// gv_Detail_RowDataBound
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gv_List_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                LinkButton CBtemp = GetCellByName(e.Row, "功能").FindControl("Print") as LinkButton;

                var 撿貨者  = GetCellByName(e.Row, "撿貨者").Text;
                var 訂單狀態 = GetCellByName(e.Row, "訂單狀態").Text;

                if (撿貨者 != "未確認" || 訂單狀態 == "取消")
                {
                    CBtemp.Visible = false;
                }
                else
                {
                    CBtemp.Visible = true;
                }

                //---------------------------------
            }

            //光棒效果
            GvLightBar.lightbar(e, 2);
        }
Beispiel #4
0
 protected void gv_List_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     GvLightBar.lightbar(e, 2);
 }
Beispiel #5
0
        /// <summary>
        /// 加光棒效果
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gv_logistics_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            try
            {
                if (DDL_Type.SelectedValue == "1+")
                {
                    e.Row.Cells[0].Width = 200;
                    if (e.Row.RowType == DataControlRowType.DataRow)
                    {
                        e.Row.Cells[5].ForeColor = System.Drawing.Color.ForestGreen;
                        if (CB_Sort.Checked)
                        {
                            if (e.Row.Cells[2].Text.Trim() != preType)
                            {
                                for (int i = 0; i <= 5; i++)
                                {
                                    e.Row.Cells[i].ForeColor = System.Drawing.Color.DarkRed;
                                }
                            }

                            preType = e.Row.Cells[2].Text.Trim();
                        }
                        else
                        {
                            if (e.Row.Cells[0].Text.Trim() != preType)
                            {
                                for (int i = 0; i <= 5; i++)
                                {
                                    e.Row.Cells[i].ForeColor = System.Drawing.Color.DarkRed;
                                }
                            }

                            preType = e.Row.Cells[0].Text.Trim();
                        }
                    }
                }
                else
                {
                    e.Row.Cells[0].Width = 200;
                    if (e.Row.RowType == DataControlRowType.DataRow)
                    {
                        e.Row.Cells[4].ForeColor = System.Drawing.Color.ForestGreen;

                        if (e.Row.Cells[1].Text.Trim() != preType)
                        {
                            for (int i = 0; i <= 4; i++)
                            {
                                e.Row.Cells[i].ForeColor = System.Drawing.Color.Blue;
                            }
                        }

                        preType = e.Row.Cells[1].Text.Trim();
                    }
                }

                //光棒效果
                //判定row的型態是資料行
                if (e.Row.RowType == DataControlRowType.DataRow)
                {
                    GvLightBar.lightbar(e, 1);
                }
            }
            catch (Exception ex)
            {
                Response.Write("系統發生錯誤 " + ex.Message);
            }
        }
Beispiel #6
0
 protected void gv_FList_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
 {
     //光棒效果
     GvLightBar.lightbar(e, 1);
 }
Beispiel #7
0
 protected void gv_Detail_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     //光棒效果
     GvLightBar.lightbar(e, 3);
 }