예제 #1
0
 private void BinData(int masobao, int trang)
 {
     try
     {
         HPCBusinessLogic.VitriTinbaiDAL _objVitritb = new HPCBusinessLogic.VitriTinbaiDAL();
         DataSet _ds;
         _ds = _objVitritb.T_Vitri_Tinbai_SelectBySoBaoAndPageNo(masobao, trang);
         if (_ds.Tables[0].Rows.Count > 0)
         {
             rptbindData.DataSource = _ds.Tables[0];
             rptbindData.DataBind();
         }
         _ds.Clear();
     }
     catch (Exception ex) { throw ex; }
 }
예제 #2
0
        private void BinData(int masobao, int trang)
        {
            try
            {
                HPCBusinessLogic.VitriTinbaiDAL _objVitritb = new HPCBusinessLogic.VitriTinbaiDAL();
                DataSet _ds;
                _ds = _objVitritb.T_Vitri_Tinbai_SelectBySoBaoAndPageNo(masobao, trang);
                DataTable tb = _ds.Tables[0];
                if (tb.Rows.Count > 0)
                {
                    for (int i = 0; i < tb.Rows.Count; i++)
                    {
                        DataRow mrow = tb.Rows[i];
                        if (mrow["Ma_Tinbai"].ToString() == "0" && mrow["Ma_QuangCao"].ToString() == "0")
                        {
                            bd.Append("<div title=" + mrow["Ma_Vitri"] + " id=" + mrow["Ma_Vitri"] + " class=\"drsElement\" style='left: " + mrow["Trai"] + "px; top: " + mrow["Tren"] + "px; cursor: move; width: " + mrow["Rong"] + "px; height: " + mrow["Dai"] + "px;'>");
                            bd.Append("<div class=\"drsMoveHandle\" id=\"Move" + mrow["Ma_Vitri"] + "\"></div>");
                            bd.Append("<input type=\"button\" id=\"btnremoveItem\" class=\"btnremoveChild\" value=\"Xóa\" onclick=\"return removeDivChildAdv('" + mrow["Ma_Vitri"] + "');\"/>");
                            bd.Append("<input type=\"button\" id=\"btnPhanviec\" class=\"btnPhanviec\" value=\"Phân việc\" onclick=\"PhanViec(this,'" + mrow["Ma_Vitri"] + "');\"/>");
                            bd.Append("<div class=\"divtextclass\" id=\"divtext" + mrow["Ma_Vitri"] + "\">");
                            bd.Append("<div style=\"display:none\">");
                            bd.Append("<input type=\"text\" value=\"" + mrow["Ma_Congviec"] + "\" id=\"txtCV" + mrow["Ma_Vitri"] + "\">");
                            bd.Append("<input type=\"text\" value=\"" + mrow["Ma_Tinbai"] + "\" id=\"txtTB" + mrow["Ma_Vitri"] + "\">");
                            bd.Append("<input id=\"txtStatusTB" + mrow["Ma_Vitri"] + "\" type=\"text\" value=\"" + mrow["Doituong_DangXuly"] + "\"/>");
                            bd.Append("</div>");
                            bd.Append("<div class=\"divtextclassTitle\">" + CheckBindTextCV(mrow["Ma_Congviec"], mrow["Tencongviec"]) + "</div>");
                            bd.Append("<div class=\"divtextclassTitle\">" + CheckBindTextTB(mrow["Ma_Tinbai"], mrow["Tieude"]) + "</div>");
                            bd.Append("<div class=\"divtextclassDes\">" + CheckBindTextTBSoTu(mrow["Ma_Tinbai"], mrow["Sotu"]) + "</div>");
                            bd.Append("</div>");
                            bd.Append("</div>");
                        }
                        else if (mrow["Ma_Tinbai"].ToString() != "0" && mrow["Ma_Congviec"].ToString() != "0")
                        {
                            bd.Append("<div title=" + mrow["Ma_Vitri"] + " id=" + mrow["Ma_Vitri"] + " class=\"drsElement\" style='left: " + mrow["Trai"] + "px; top: " + mrow["Tren"] + "px; cursor: move; width: " + mrow["Rong"] + "px; height: " + mrow["Dai"] + "px;'>");
                            bd.Append("<div class=\"drsMoveHandle\" id=\"Move" + mrow["Ma_Vitri"] + "\"></div>");
                            bd.Append("<input type=\"button\" id=\"btnremoveItem\" class=\"btnremoveChild\" value=\"Xóa\" onclick=\"return removeDivChildAdv('" + mrow["Ma_Vitri"] + "');\"/>");
                            bd.Append("<input type=\"button\" id=\"btnPhanviec\" class=\"btnPhanviec\" value=\"Phân việc\" onclick=\"PhanViec(this,'" + mrow["Ma_Vitri"] + "');\"/>");
                            bd.Append("<div class=\"divtextclass\" id=\"divtext" + mrow["Ma_Vitri"] + "\">");
                            bd.Append("<div style=\"display:none\">");
                            bd.Append("<input type=\"text\" value=\"" + mrow["Ma_Congviec"] + "\" id=\"txtCV" + mrow["Ma_Vitri"] + "\">");
                            bd.Append("<input type=\"text\" value=\"" + mrow["Ma_Tinbai"] + "\" id=\"txtTB" + mrow["Ma_Vitri"] + "\">");
                            bd.Append("<input id=\"txtStatusTB" + mrow["Ma_Vitri"] + "\" type=\"text\" value=\"" + mrow["Doituong_DangXuly"] + "\"/>");
                            bd.Append("</div>");
                            bd.Append("<div class=\"divtextclassTitle\">" + CheckBindTextCV(mrow["Ma_Congviec"], mrow["Tencongviec"]) + "</div>");
                            bd.Append("<div class=\"divtextclassTitle\">" + CheckBindTextTB(mrow["Ma_Tinbai"], mrow["Tieude"]) + "</div>");
                            bd.Append("<div class=\"divtextclassDes\">" + CheckBindTextTBSoTu(mrow["Ma_Tinbai"], mrow["Sotu"]) + "</div>");
                            bd.Append("</div>");
                            bd.Append("</div>");
                        }
                        else if (mrow["Ma_Tinbai"].ToString() != "0" && mrow["Ma_Congviec"].ToString() == "0")
                        {
                            bd.Append("<div title=" + mrow["Ma_Vitri"] + " id=" + mrow["Ma_Vitri"] + " class=\"drsElementStatic\" style='left: " + mrow["Trai"] + "px; top: " + mrow["Tren"] + "px; cursor: move; width: " + mrow["Rong"] + "px; height: " + mrow["Dai"] + "px;'>");
                            bd.Append("<div class=\"drsMoveHandleStatic\" id=\"Move" + mrow["Ma_Vitri"] + "\"></div>");
                            bd.Append("<div class=\"divtextclass\" id=\"divtext" + mrow["Ma_Vitri"] + "\">");

                            bd.Append("<div style=\"display:none\">");
                            bd.Append("<input type=\"text\" value=\"" + mrow["Ma_QuangCao"] + "\" id=\"txtAdv" + mrow["Ma_Vitri"] + "\">");
                            bd.Append("<input type=\"text\" value=\"" + mrow["Ma_Tinbai"] + "\" id=\"txtTB" + mrow["Ma_Vitri"] + "\">");
                            bd.Append("<input type=\"text\" value=\"" + mrow["Doituong_DangXuly"] + "\" id=\"txtStatusTB" + mrow["Ma_Vitri"] + "\"  />");
                            bd.Append("</div>");
                            //bd.Append("<div class=\"divtextclassTitle\">" + CheckBindTextTitleAdv(mrow["Ma_QuangCao"], mrow["Ten_QuangCao"]) + "</div>");
                            bd.Append("<div class=\"divtextclassTitle\">" + CheckBindTextTB(mrow["Ma_Tinbai"], mrow["Tieude"]) + "</div>");
                            bd.Append("<div class=\"divtextclassDes\">" + CheckBindTextTBSoTu(mrow["Ma_Tinbai"], mrow["Sotu"]) + "</div>");
                            bd.Append("</div>");
                            bd.Append("</div>");
                        }
                        else if (mrow["Ma_QuangCao"].ToString() != "0")
                        {
                            bd.Append("<div title=" + mrow["Ma_Vitri"] + " id=" + mrow["Ma_Vitri"] + " class=\"drsElementStatic\" style='left: " + mrow["Trai"] + "px; top: " + mrow["Tren"] + "px; cursor: move; width: " + mrow["Rong"] + "px; height: " + mrow["Dai"] + "px;'>");
                            bd.Append("<div class=\"drsMoveHandleStatic\" id=\"Move" + mrow["Ma_Vitri"] + "\"></div>");
                            bd.Append("<div class=\"divtextclass\" id=\"divtext" + mrow["Ma_Vitri"] + "\">");

                            bd.Append("<div style=\"display:none\">");
                            bd.Append("<input type=\"text\" value=\"" + mrow["Ma_QuangCao"] + "\" id=\"txtAdv" + mrow["Ma_Vitri"] + "\">");
                            bd.Append("<input type=\"text\" value=\"" + mrow["Ma_Tinbai"] + "\" id=\"txtTB" + mrow["Ma_Vitri"] + "\">");
                            bd.Append("<input type=\"text\" value=\"" + mrow["Doituong_DangXuly"] + "\" id=\"txtStatusTB" + mrow["Ma_Vitri"] + "\"  />");
                            bd.Append("</div>");
                            bd.Append("<div class=\"divtextclassTitle\">" + CheckBindTextTitleAdv(mrow["Ma_QuangCao"], mrow["Ten_QuangCao"]) + "</div>");
                            //bd.Append("<div class=\"divtextclassTitle\">" + CheckBindTextTB(mrow["Ma_Tinbai"], mrow["Tieude"]) + "</div>");
                            //bd.Append("<div class=\"divtextclassDes\">" + CheckBindTextTBSoTu(mrow["Ma_Tinbai"], mrow["Sotu"]) + "</div>");
                            bd.Append("</div>");
                            bd.Append("</div>");
                        }
                    }
                }
                ltrBindData.Text = bd.ToString();
                _ds.Clear();
            }
            catch (Exception ex) { throw ex; }
        }