Пример #1
0
    protected void GridView1_RowDataBound1(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            TakeOutDataInfo obj = (TakeOutDataInfo)e.Row.DataItem;

            e.Row.Cells[1].Text = bll.timeKor(obj.TakeOutItemDataList[0].TakeOutTime);                              //반출일 ngày mang ra
            e.Row.Cells[2].Text = obj.RequestUserDisplayName;                                                       //신청자 người đăng ký
            e.Row.Cells[3].Text = StringUtil.GetShortString(obj.CompanyName, 50, "...");                            //반출처 địa điểm
            e.Row.Cells[4].Text = StringUtil.GetShortString(obj.RecieveName, 50, "");                               //수령자 người nhận
            e.Row.Cells[5].Text = bll.requireKor(obj.RequireIN);                                                    //반입여부 có/không vào cổng
            e.Row.Cells[6].Text = StringUtil.GetShortString(obj.TakeOutItemDataList[0].TakeOutItemName, 18, "..."); //반출항목 hamgj mục ra

            //반입일 표시 hiển thị ngày vào
            if (obj.RequireIN == 2)
            {
                e.Row.Cells[9].Text = "Không đồng ý (반입불가)";
            }
            else
            {
                e.Row.Cells[9].Text = bll.timeKor(obj.TakeOutItemDataList[0].TakeINTime); //반입일 Ngày vào
            }

            e.Row.Cells[10].Text = bll.getApproveStringKOR(obj);

            for (int i = 0; i < e.Row.Cells.Count; i++)
            {
                if (i < 10)
                {
                    e.Row.Cells[i].Attributes.Add("onclick", "window.location='viewTakeOut.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "';");
                    e.Row.Cells[i].Attributes.Add("style", "cursor:hand;");
                }
            }

            //반입예정일이 지난 것들 색상 표시 hiển thị màu sắc quá hạn ngày dự định vào
            if (obj.RequireIN == 1 && obj.TakeOutItemDataList[0].TakeINTime == "-" && obj.TakeOutItemDataList[0].TakeOutTime != "-")
            {
                if (Convert.ToDateTime(obj.ScheduleInDate) < DateTime.Now.Date)
                {
                    e.Row.Attributes.Add("style", "background-color:#FFF7A2;");
                    e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C0C0C0'");
                    e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFF7A2'");
                }
                else
                {
                    e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C0C0C0'");
                    e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'");
                }
            }
            else
            {
                e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C0C0C0'");
                e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'");
            }
        }
    }
Пример #2
0
    protected void GridView1_RowDataBound1(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            TakeOutDataInfo obj = (TakeOutDataInfo)e.Row.DataItem;

            e.Row.Cells[1].Text = bll.timeKor(obj.TakeOutItemDataList[0].TakeOutTime);                              //반출일 ngày mang ra
            e.Row.Cells[2].Text = StringUtil.GetShortString(obj.CompanyName, 50, "...");                            //반출처 nơi nhận
            e.Row.Cells[3].Text = StringUtil.GetShortString(obj.RecieveName, 50, "...");                            //수령자 người nhận
            e.Row.Cells[4].Text = bll.requireKor(obj.RequireIN);                                                    //반입여부
            e.Row.Cells[5].Text = StringUtil.GetShortString(obj.TakeOutItemDataList[0].TakeOutItemName, 18, "..."); //반출항목 hạng mục mang ra

            //반입일 표시 hiển thị ngày vào
            if (obj.RequireIN == 2)
            {
                e.Row.Cells[8].Text = "Không thể mang vào (반입불가))"; // Không đồng ý ra
            }
            else
            {
                e.Row.Cells[8].Text = bll.timeKor(obj.TakeOutItemDataList[0].TakeINTime); //반입일
            }

            //반려 일 경우 삭제 xóa ngày trả lại
            if (obj.ApprovalState == 3)
            {
                e.Row.Cells[11].Text  = "<a href='#;' onclick=\"javascript:confirmDelete('deleteTakeOut.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "');\">";
                e.Row.Cells[11].Text += "<img src='/COMS/images/icon/delete.gif'></a>";
            }
            // 임시저장일 경우 수정과 삭제 보이기 sửa và xóa ngày lưu tạm thời
            if (obj.ApprovalState == 0)
            {
                e.Row.Cells[10].Text  = "<a href='inputTakeOut.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "&mode=modify'>";
                e.Row.Cells[10].Text += "<img src='/COMS/images/icon/edit.gif'></a>";

                e.Row.Cells[11].Text  = "<a href='#;' onclick=\"javascript:confirmDelete('deleteTakeOut.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "');\">";
                e.Row.Cells[11].Text += "<img src='/COMS/images/icon/delete.gif'></a>";

                // e.Row.Cells[1].Text = bll.timeKor(obj.TakeINTime);
                //HyperLink colModify = (HyperLink)e.Row.Cells[11].Controls[0];
                //colModify.NavigateUrl = "inputTakeOut.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "&mode=modify";
                //colModify.ImageUrl = "~/images/icon/edit.gif";

                //HyperLink colDelete = (HyperLink)e.Row.Cells[12].Controls[0];
                //colDelete.NavigateUrl = "#";
                //colDelete.Attributes.Add("onclick", "javascript:confirmDelete('deleteTakeOut.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "');");
                //colDelete.ImageUrl = "~/images/icon/delete.gif";
            }

            //    e.Row.Cells[1].Text = bll.timeKor(obj.TakeOutTime);
            e.Row.Cells[9].Text = bll.getApproveStringKOR(obj);

            for (int i = 0; i < e.Row.Cells.Count; i++)
            {
                if (i < 11)
                {
                    e.Row.Cells[i].Attributes.Add("onclick", "window.location='viewTakeOut.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "';");
                    e.Row.Cells[i].Attributes.Add("style", "cursor:hand;");
                }
            }

            //반입예정일이 지난 것들 색상 표시biểu thì màu sắc cho quá hạn ngày dự định vào
            if (obj.RequireIN == 1 && obj.TakeOutItemDataList[0].TakeINTime == "-" && obj.TakeOutItemDataList[0].TakeOutTime != "-")
            {
                if (Convert.ToDateTime(obj.ScheduleInDate) < DateTime.Now.Date)
                {
                    e.Row.Attributes.Add("style", "background-color:#FFF7A2;");
                    e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C0C0C0'");
                    e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFF7A2'");
                }
                else
                {
                    e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C0C0C0'");
                    e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'");
                }
            }
            else
            {
                e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C0C0C0'");
                e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'");
            }

            //e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C0C0C0'");
            //e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'");
        }
    }
Пример #3
0
    protected void GridView1_RowDataBound1(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            TakeOutDataInfo obj = (TakeOutDataInfo)e.Row.DataItem;

            e.Row.Cells[1].Text = bll.timeKor(obj.TakeOutItemDataList[0].TakeOutTime);                              //반출일 ngày mang ra
            e.Row.Cells[2].Text = obj.RequestUserDisplayName;                                                       //신청자  người đăng ký
            e.Row.Cells[3].Text = StringUtil.GetShortString(obj.CompanyName, 100, "...");                           //반출처   địa điểm mang ra
            e.Row.Cells[4].Text = StringUtil.GetShortString(obj.RecieveName, 50, "...");                            //수령자 người nhận
            e.Row.Cells[5].Text = bll.requireKor(obj.RequireIN);                                                    // 반입여부
            e.Row.Cells[6].Text = StringUtil.GetShortString(obj.TakeOutItemDataList[0].TakeOutItemName, 18, "..."); //반출항목  hạng mục tài sản ra

            //반입일 표시  hiển thị ngày mang vào
            if (obj.RequireIN == 2)
            {
                e.Row.Cells[10].Text = "Không thể mang vào 반입불가";
            }
            else
            {
                e.Row.Cells[10].Text = bll.timeKor(obj.TakeOutItemDataList[0].TakeINTime); //반입일 ngày mang vào
            }

            e.Row.Cells[11].Text = bll.getApproveStringKOR(obj); //결재상태 tình trạng phê duyệt

            for (int i = 0; i < e.Row.Cells.Count; i++)
            {
                if (i < 12)
                {
                    e.Row.Cells[i].Attributes.Add("onclick", "window.location='../takeOut/viewTakeOut.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "';");
                    e.Row.Cells[i].Attributes.Add("style", "cursor:hand;");
                }
            }

            if (obj.ApprovalState == 2) //결재상태(결재완료)  tình trạng phê duyệt (hoàn thành phê duyệt )
            {
                //stKeyWord = Request.Form["keyWord"];
                //stKey = Request.Form["key"];

                if (obj.TakeOutItemDataList[0].TakeOutTime == "-") //반출시간데이터 유무 확인
                {
                    //HyperLink colINTime = (HyperLink)e.Row.Cells[11].Controls[0];
                    //colINTime.NavigateUrl = "javascript:confirmMove('반출 처리 하시겠습니까?','takeOutTimeUpdate.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "&mode=outTime')";
                    //colINTime.Text = "<span style=\"color:blue\">반출 처리</span>";
                    //if (Convert.ToDateTime(obj.ScheduleOutDate) >= DateTime.Now.Date) // 반출예정일 지나지 않은것만 반출처리
                    //{
                    e.Row.Cells[12].Text = "<a href='#;' onClick=\"javascript:confirmMove('Bạn có muốn xử lý tài sản ra cổng không? (일괄 반출 처리 하시겠습니까?)','takeOutTimeUpdate.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "&keyWord=" + Request["keyWord"] + "&key=" + Request["key"] + "&mode=outTime')\">";
                    //e.Row.Cells[12].Text = "<a href='#;' onClick=\"javascript:confirmMove('일괄 반출 처리 하시겠습니까?','takeOutTimeUpdate.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "&mode=outTime')\">";
                    e.Row.Cells[12].Text += "<span style=\"color:blue\">Xử lý mang ra (반출 처리)</span></a>";
                    //}
                }
                else
                {
                    if (obj.RequireIN == 1 && obj.TakeOutItemDataList[0].TakeINTime == "-") //반입필  Cần mang vào
                    {
                        e.Row.Cells[12].Text = "<a href='#;' onClick=\"javascript:confirmMove('Bạn có muốn xử lý vào cổng không? (반입 처리 하시겠습니까?)','takeOutTimeUpdate.aspx?takeOutItemDataCode=" + obj.TakeOutItemDataList[0].TakeOutItemDataCode + "&keyWord=" + Request["keyWord"] + "&key=" + Request["key"] + "&mode=inTime')\">";
                        //e.Row.Cells[12].Text = "<a href='#;' onClick=\"javascript:confirmMove('반입 처리 하시겠습니까?','takeOutTimeUpdate.aspx?takeOutItemDataCode=" + obj.TakeOutItemDataList[0].TakeOutItemDataCode + "&mode=inTime')\">";
                        e.Row.Cells[12].Text += "<span style=\"color:red\">Xử lý mang vào (반입 처리)</span></a>";
                    }
                    else
                    {
                        e.Row.Cells[12].Text = "<span style=\"color:blue\">Kết thúc (종료)</span></a>";
                    }
                }
            }
            // 2017-09-06-임종우 : 그룹웨어 Interface 오류가 많아 수동으로 결재승인 처리 로직 추가. 결재상신중이면 강제 결재 승인 가능하도록 추가.
            else if (obj.ApprovalState == 1)
            {
                e.Row.Cells[12].Text  = "<a href='#;' onClick=\"javascript:confirmMove('Bạn có muốn xử lý phê duyệt điện tử không? (결재 승인 처리 하시겠습니까?)','elecApproveUpdate.aspx?takeOutDataCode=" + obj.TakeOutDataCode + "&status=2" + "&keyWord=" + Request["keyWord"] + "&key=" + Request["key"] + "&mode=takeOut')\">";
                e.Row.Cells[12].Text += "<span style=\"color:Green\">Đồng ý phê duyệt (결재 승인)</span></a>";
            }
            else
            {
                e.Row.Cells[12].Text = "";
            }

            //반입예정일이 지난 것들 색상 표시
            if (obj.RequireIN == 1 && obj.TakeOutItemDataList[0].TakeINTime == "-" && obj.TakeOutItemDataList[0].TakeOutTime != "-")
            {
                if (Convert.ToDateTime(obj.ScheduleInDate) < DateTime.Now.Date)
                {
                    e.Row.Attributes.Add("style", "background-color:#FFF7A2;");
                    e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C0C0C0'");
                    e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFF7A2'");
                }
                else
                {
                    e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C0C0C0'");
                    e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'");
                }
            }
            else
            {
                e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#C0C0C0'");
                e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'");
            }
        }
    }