public UnitCtType(DataRow row) { this.UnitId = ConvertUtility.Trim(row["UnitId"]); this.BuildId = ConvertUtility.Trim(row["BuildId"]); this.CX_Axis = ConvertUtility.Trim(row["CX_Axis"]); this.CY_Axis = ConvertUtility.Trim(row["CY_Axis"]); this.CountF = ConvertUtility.ToInt(row["CountF"]); this.CountT = ConvertUtility.ToInt(row["CountT"]); this.CountW = ConvertUtility.ToInt(row["CountW"]); this.CountY = ConvertUtility.ToInt(row["CountY"]); this.Area = ConvertUtility.ToFloat(row["Area"]); this.DirectionTo = ConvertUtility.Trim(row["DirectionTo"]); this.Operate = ConvertUtility.ToInt(row["OperateStatus"]); this.Flow = ConvertUtility.ToInt(row["FlowStatus"]); this.AgencyCom_UnitId = ConvertUtility.Trim(row["AgencyCom_UnitId"]); this.AgencyCom_BuildId = ConvertUtility.Trim(row["AgencyCom_BuildId"]); this.AgencyCom_CX_Axis = ConvertUtility.Trim(row["AgencyCom_CX_Axis"]); this.AgencyCom_CY_Axis = ConvertUtility.Trim(row["AgencyCom_CY_Axis"]); this.AgencyCom_CountF = ConvertUtility.ToInt(row["AgencyCom_CountF"]); this.AgencyCom_CountT = ConvertUtility.ToInt(row["AgencyCom_CountT"]); this.AgencyCom_CountW = ConvertUtility.ToInt(row["AgencyCom_CountW"]); this.AgencyCom_CountY = ConvertUtility.ToInt(row["AgencyCom_CountY"]); this.AgencyCom_Area = ConvertUtility.ToFloat(row["AgencyCom_Area"]); this.AgencyCom_DirectionTo = ConvertUtility.Trim(row["AgencyCom_DirectionTo"]); this.CreateBy = ConvertUtility.Trim(row["CreateBy"]); this.CreateDate = ConvertUtility.ToDateTime(row["CreateDate"]); this.ModifyBy = ConvertUtility.Trim(row["ModifyBy"]); this.ModifyDate = ConvertUtility.ToDateTime(row["ModifyDate"]); }
protected void btnThemMoi1_Click(object sender, EventArgs e) { //lay dot danh gia truoc ra lam chuan int idDotDanhCopy = ConvertUtility.ToInt32(DotDanhGiaController.GetDaultDotDanhGia().Rows[0]["ID"]); #region Tao dot danh gia moi DotDanhGiaInfo infoDotDanhGia = new DotDanhGiaInfo(); infoDotDanhGia.Ten = txtTen.Text.Trim(); infoDotDanhGia.ThoiGianBatDau = ConvertUtility.ToDateTime(txtThoiGianBatDau.Text); infoDotDanhGia.ThoiGianKetThuc = ConvertUtility.ToDateTime(txtThoiGianKetThuc.Text); infoDotDanhGia.TrangThai = ConvertUtility.ToInt32(dropTypeOf.SelectedValue); infoDotDanhGia.DangChay = ConvertUtility.ToInt32(dropStatus.SelectedValue); infoDotDanhGia.IsDefault = ConvertUtility.ToInt32(dropChuan.SelectedValue); infoDotDanhGia.Nam = infoDotDanhGia.ThoiGianKetThuc.Year; infoDotDanhGia.Thang = infoDotDanhGia.ThoiGianKetThuc.Month; int idDotDanhGia = DotDanhGiaController.Insert(infoDotDanhGia); #endregion DataTable dtTrungTam = BoPhanController.BoPhan_GetAllActive(); foreach (DataRow itemTrungTam in dtTrungTam.Rows) { DataTable source = QuanLyCongViecKTXVaPSController.GetAllNhanVienTheoQLVaDotDanhGia(ConvertUtility.ToInt32(itemTrungTam["ID"]), idDotDanhCopy); UpdateNhanVienTheoNDG(source, idDotDanhGia, ConvertUtility.ToInt32(itemTrungTam["ID"])); UpdateNhanVienVaoDotDanhGia(source, idDotDanhGia, ConvertUtility.ToInt32(itemTrungTam["ID"])); } }
protected void rptOther_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemIndex < 0) { return; } DataRowView curData = (DataRowView)e.Item.DataItem; HyperLink lnkother = (HyperLink)e.Item.FindControl("lnkother"); //if (lang == "1") //{ lnkother.Text = "Kết quả ngày " + ConvertUtility.ToDateTime(curData["lot_time"]).ToString("dd/MM/yyyy"); //} //else //{ // lnkother.Text = "Ket qua ngay " + ConvertUtility.ToDateTime(curData["lot_time"]).ToString("dd/MM/yyyy"); //} //lnkother.NavigateUrl = UrlProcess.GetXosoByCityDetailUrl(lang.ToString(), "byday", width, curData["lot_id"].ToString(),companyid.ToString()); //string content = cpid + "&" + Constant.xoso + curData["lot_id"].ToString() + "&" + kqxsprice + "&" + transaction_newid; //lnkother.NavigateUrl = "KQByDay.aspx?id=" + curData["lot_id"].ToString() + "&lang=" + lang + "&w=" + width; lnkother.NavigateUrl = UrlProcess.XoSoChiTiet(ConvertUtility.ToInt32(curData["lot_id"].ToString()), Constant.XoSo_KqbyDay_Rewrite); }
protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); HocsinhInfo info = HocsinhDB.GetInfo(_hocsinhid); if (info == null) { return; } lblDateTime.Text = ConvertUtility.ToDateTime(info.Hocsinh_CreateDate).ToString("dd/MM/yyyy HH:mm"); lnkFullname.Text = info.Hocsinh_Name; lnkFullname.NavigateUrl = "mailto:" + info.Hocsinh_Email; lblPhuHuynh.Text = info.Hocsinh_Parent; lblEmail.Text = info.Hocsinh_Email; lblPhone.Text = info.Hocsinh_Tel; lblAddress.Text = info.Hocsinh_Address.Replace("\n", "<br>"); lblBirthday.Text = info.Hocsinh_Birthday; lblContent.Text = info.Hocsinh_Note.Replace("\n", "<br>"); chkIsLearning.Checked = info.Hocsinh_IsLearning; dtlProduct.DataSource = HocsinhRegisterDB.GetKhoahoc(_hocsinhid); dtlProduct.DataBind(); }
protected void dtgError_ItemDataBound(object sender, DataGridItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { DataRowView curData = (DataRowView)e.Item.DataItem; e.Item.Cells[2].Text = ConvertUtility.ToString(e.Item.DataSetIndex + 1); HyperLink lnkUrl = (HyperLink)e.Item.FindControl("lnkUrl"); Label lblDate = (Label)e.Item.FindControl("lblDate"); lnkUrl.NavigateUrl = curData["Error_Url"].ToString(); lnkUrl.Text = curData["Error_Url"].ToString(); lblDate.Text = ConvertUtility.ToDateTime(curData["Error_Datetime"]).ToString(); ImageButton btn_delete = (ImageButton)e.Item.FindControl("btn_delete"); btn_delete.Attributes.Add("onclick", MiscUtility.DELETE_CONFIRM); e.Item.Attributes.Add("onmouseover", "this.className='Hoverrow';"); if (e.Item.ItemType == ListItemType.AlternatingItem) { e.Item.Attributes.Add("onmouseout", "this.className='DarkRow';"); } else { e.Item.Attributes.Add("onmouseout", "this.className='LightRow';"); } } }
protected void rptResult_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemIndex < 0) { return; } DataRowView curData = (DataRowView)e.Item.DataItem; HyperLink lnkTitle = (HyperLink)e.Item.FindControl("lnkTitle"); Label lblCreatedOn = (Label)e.Item.FindControl("lblCreatedOn"); if (lang == 1) { lnkTitle.Text = curData["Content_Headline"].ToString(); lblCreatedOn.Text = "Ngày: " + ConvertUtility.ToDateTime(curData["Content_CreateDate"]).ToString("dd/MM/yyyy"); } else { lnkTitle.Text = curData["Content_HeadlineKD"].ToString(); lblCreatedOn.Text = "Ngay: " + ConvertUtility.ToDateTime(curData["Content_CreateDate"]).ToString("dd/MM/yyyy"); } //lnkTitle.NavigateUrl = UrlProcess.GetRelaxNewsDetailUrl(lang.ToString(), "detail", width, curData["Distribution_ID"].ToString()); string content = cpid + "&" + Constant.giaitri_haihuoc + curData["Distribution_ID"].ToString() + "&" + price + "&" + vmstransactionid; lnkTitle.NavigateUrl = ConfigurationSettings.AppSettings.Get("vms3g") + "?link=" + Server.UrlEncode(EAS.EncryptData(content, ConfigurationSettings.AppSettings.Get("vmskey"))); }
public static HocsinhRegisterInfo GetInfo(int hocsinh_ID, int contentId) { HocsinhRegisterInfo retVal = null; var dbConn = new SqlConnection(AppEnv.ConnectionString); var dbCmd = new SqlCommand("Solart_Register_GetInfo", dbConn) { CommandType = CommandType.StoredProcedure }; dbCmd.Parameters.AddWithValue("@Hocsinh_ID", hocsinh_ID); dbCmd.Parameters.AddWithValue("@Content_ID", contentId); try { dbConn.Open(); var dr = dbCmd.ExecuteReader(); if (dr.Read()) { retVal = new HocsinhRegisterInfo(); retVal.Hocsinh_ID = ConvertUtility.ToInt32(dr["Hocsinh_ID"]); retVal.Content_ID = ConvertUtility.ToInt32(dr["Content_ID"]); retVal.RegisterTime = ConvertUtility.ToDateTime(dr["RegisterTime"]); } if (dr != null) { dr.Close(); } } finally { dbConn.Close(); } return(retVal); }
private void InsertCongViecCon(DataTable source, DataRow curItem, int parentId, int idDotDanhGia) { DataRow[] rowChild = source.Select("ParentID='" + ConvertUtility.ToInt32(curItem["ID"]) + "'"); if (rowChild.Length > 0) { foreach (DataRow itemChild in rowChild) { QuanLyCongViecKTXVaPSInfo info = new QuanLyCongViecKTXVaPSInfo(); info.Ten = ConvertUtility.ToString(itemChild["Ten"]); info.TyTrong = ConvertUtility.ToDouble(itemChild["TyTrong"]); info.SoGio = ConvertUtility.ToDouble(itemChild["SoGio"]); info.ParentID = parentId; info.Priority = ConvertUtility.ToInt32(itemChild["Priority"]); info.KeHoach = ConvertUtility.ToString(itemChild["KeHoach"]); info.DonViDo = ConvertUtility.ToString(itemChild["DonViDo"]); info.IDTrungTam = ConvertUtility.ToInt32(itemChild["IDTrungTam"]); info.IDPhongBan = ConvertUtility.ToInt32(itemChild["IDPhongBan"]); info.Loai = ConvertUtility.ToInt32(itemChild["Loai"]); info.IDDotDanhGia = idDotDanhGia; info.LevelDeep = ConvertUtility.ToInt32(itemChild["LevelDeep"]); info.NgayBatDau = ConvertUtility.ToDateTime(itemChild["NgayBatDau"]).AddMonths(1); info.NgayKetThuc = ConvertUtility.ToDateTime(itemChild["NgayKetThuc"]).AddMonths(1); info.TrangThaiCV = ConvertUtility.ToInt32(itemChild["TrangThaiCV"]); info.TuanLamViec = ConvertUtility.ToString(itemChild["TuanLamViec"]); info.OldID = ConvertUtility.ToInt32(itemChild["ID"]); int parentIDTemp = QuanLyCongViecKTXVaPSController.Insert_6_11_2014(info); InsertCongViecCon(source, itemChild, parentIDTemp, idDotDanhGia); } } }
static object convertType(object value, Type t) { object ret = null; if (t == typeof(int)) { return(ConvertUtility.ToInt32(value)); } else if (t == typeof(bool)) { ret = ConvertUtility.ToBoolean(value); } else if (t == typeof(DateTime)) { ret = ConvertUtility.ToDateTime(value); } else if (t == typeof(String)) { ret = ConvertUtility.ToString(value); } else if (t == typeof(Decimal)) { ret = Convert.ToDecimal(value); } else if (t == typeof(Double)) { ret = Convert.ToDouble(value); } else { ret = value; } return(ret); }
protected void rptlstCategory_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemIndex < 0) { return; } DataRowView curData = (DataRowView)e.Item.DataItem; HyperLink lnkTitle = (HyperLink)e.Item.FindControl("lnkTitle"); Label lblCreatedOn = (Label)e.Item.FindControl("lblCreatedOn"); Image imgAvatar = (Image)e.Item.FindControl("imgAvatar"); if (lang == 1) { lnkTitle.Text = curData["Content_Headline"].ToString(); } else { lnkTitle.Text = curData["Content_HeadlineKD"].ToString(); } if (string.IsNullOrEmpty(ConvertUtility.ToString(curData["Content_Avatar"]))) { imgAvatar.ImageUrl = "/Images/icon_app52.png"; } else { imgAvatar.ImageUrl = AppEnv.GetAvatarTheThaoSo(curData["Content_Avatar"].ToString(), 60, 60); } lnkTitle.NavigateUrl = UrlProcess.GetNewsDetailUrlTheThaoSo(lang.ToString(), width, curData["Distribution_ID"].ToString()); lblCreatedOn.Text = ConvertUtility.ToDateTime(curData["Content_CreateDate"]).ToString("dd/MM/yyyy hh:mm"); }
protected void btnThemMoi2_Click(object sender, EventArgs e) { DanhGiaThang_DGCBCNVDanhGiaTTCVInfo info = new DanhGiaThang_DGCBCNVDanhGiaTTCVInfo(); info.IDDotDanhGia = idDotDanhGia; info.IDNhanVien = idNhanVien; info.TenCongViec = txtTenCongViec2.Text.Trim(); info.TyTrongCV = ConvertUtility.ToDouble(txtTyTrongCongViec2.Text); info.SoLieuCamKet = ConvertUtility.ToString(txtSoLieuCamKet2.Text); info.YeuCauHoTro = ConvertUtility.ToString(txtYeuCauCanHoTro2.Text); info.Loai = 2; info.IDBoPhan = userInfo.IDTrungTam; info.IDBoPhanHoTro = ConvertUtility.ToInt32(dropBoPhanHoTro.SelectedValue); info.IDPhongBan = userInfo.IDPhong; info.SoGio = ConvertUtility.ToDouble(txtSoGio.Text); info.TyTrongCV = info.SoGio * 100 / 176; info.NgayBatDau = ConvertUtility.ToDateTime(dtFrom.Text); info.NgayKetThuc = ConvertUtility.ToDateTime(dtTo.Text); int idCongViec = DanhGiaThang_DGCBCNVDanhGiaTTCVController.InsertKeHoachThang(info); //foreach (ListItem item in dropBoPhanHoTro.Items) //{ // if (item.Selected) // { // DanhGiaThang_DGCBCNVDanhGiaTTCVController.UpdateKeHoachThangBoPhanHoTro(idDotDanhGia, idCongViec, ConvertUtility.ToInt32(item.Value)); // } // else // { // DanhGiaThang_DGCBCNVDanhGiaTTCVController.DeleteKeHoachThangBoPhanHoTro(idDotDanhGia, idCongViec, ConvertUtility.ToInt32(item.Value)); // } //} }
protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); OrderInfo info = OrderDB.GetInfo(_orderid); if (info == null) { return; } lblID.Text = info.Order_ID.ToString(); lblDateTime.Text = ConvertUtility.ToDateTime(info.Order_CreateDate).ToString("dd/MM/yyyy HH:mm"); lnkFullname.Text = info.Order_Fullname; lnkFullname.NavigateUrl = AppEnv.ADMIN_CMD + "memberupdate&memberid=" + info.Member_ID; lblEmail.Text = info.Order_Email; lblPhone.Text = info.Order_Tel; lblAddress.Text = info.Order_Address.Replace("\n", "<br>"); lblDistrict.Text = info.Order_District; lblCity.Text = info.Order_City; lblContent.Text = info.Order_Note.Replace("\n", "<br>"); MiscUtility.SetSelected(dropStatus.Items, info.Order_Status.ToString()); lblQuantity.Text = ConvertUtility.ToInt32(info.Order_Quantity).ToString(); lblPrice.Text = String.Format("{0:0,0}", info.Order_Price) + " VNÐ"; dtlProduct.DataSource = OrderDB.GetProductByOrderID(_orderid); dtlProduct.DataBind(); }
protected void dtgProduct_ItemDataBound(object sender, DataGridItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { var curData = (DataRowView)e.Item.DataItem; var lblDatetime = (Label)e.Item.FindControl("lblDatetime"); var lnkOrderName = (HyperLink)e.Item.FindControl("lnkOrderName"); var lblAddress = (Label)e.Item.FindControl("lblAddress"); var dropStatus = (DropDownList)e.Item.FindControl("dropStatus"); lblDatetime.Text = ConvertUtility.ToDateTime(curData["Hocsinh_CreateDate"]).ToString("dd/MM/yyyy HH:mm"); lnkOrderName.ToolTip = curData["Hocsinh_Note"].ToString(); lnkOrderName.Text = curData["Hocsinh_Name"].ToString(); lnkOrderName.NavigateUrl = "mailto:" + curData["Hocsinh_Email"]; lblAddress.Text = curData["Hocsinh_Address"].ToString(); var btn_delete = (WebControl)e.Item.FindControl("btn_delete"); btn_delete.Attributes.Add("onclick", MiscUtility.DELETE_CONFIRM); e.Item.Attributes.Add("onmouseover", "this.className='Hoverrow';"); if (e.Item.ItemType == ListItemType.AlternatingItem) { e.Item.Attributes.Add("onmouseout", "this.className='DarkRow';"); } else { e.Item.Attributes.Add("onmouseout", "this.className='LightRow';"); } } }
protected void rptlstCategory_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemIndex < 0) { return; } DataRowView curData = (DataRowView)e.Item.DataItem; HyperLink lnkTitle = (HyperLink)e.Item.FindControl("lnkTitle"); Label lblCreatedOn = (Label)e.Item.FindControl("lblCreatedOn"); Image imgAvatar = (Image)e.Item.FindControl("imgAvatar"); if (lang == 1) { lnkTitle.Text = "<span class=\"bold\">" + curData["Content_Headline"].ToString() + "</span>"; } else { lnkTitle.Text = "<span class=\"bold\">" + curData["Content_HeadlineKD"].ToString() + "</span>"; } if (string.IsNullOrEmpty(ConvertUtility.ToString(curData["Content_Avatar"]))) { imgAvatar.ImageUrl = "/Images/icon_app52.png"; } else { WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver(); ws.GenerateAvatarThumnail(curData["Content_Avatar"].ToString(), 60, 60); imgAvatar.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(curData["Content_Avatar"].ToString(), 60, 60).Replace("~", ""); } lnkTitle.NavigateUrl = UrlProcess.GetMusicNewsDetailUrl(lang.ToString(), width, curData["Distribution_ID"].ToString()); lblCreatedOn.Text = ConvertUtility.ToDateTime(curData["Content_CreateDate"]).ToString("dd/MM/yyyy"); }
private static List <Service_Info> PopulateObjectsFromReader(IDataReader dataReader) { List <Service_Info> list = new List <Service_Info>(); while (dataReader.Read()) { Service_Info service = new Service_Info(); service.ID = ConvertUtility.ToInt32(dataReader["ID"]); service.Service_Name = ConvertUtility.ToString(dataReader["Service_Name"]); service.Service_Code = ConvertUtility.ToString(dataReader["Service_Code"]); service.Service_Type = ConvertUtility.ToInt32(dataReader["Service_Type"]); service.TimesMT = ConvertUtility.ToString(dataReader["TimesMT"]); service.TimesAlert = ConvertUtility.ToString(dataReader["TimesAlert"]); service.WelcomeMT = ConvertUtility.ToString(dataReader["WelcomeMT"]); service.DailyMT = ConvertUtility.ToString(dataReader["DailyMT"]); service.WaitingMT = ConvertUtility.ToString(dataReader["WaitingMT"]); service.CronTime = ConvertUtility.ToString(dataReader["CronTime"]); service.Status = ConvertUtility.ToInt32(dataReader["Status"]); service.TimelineFirst = ConvertUtility.ToInt32(dataReader["TimelineFirst"]); service.TimelineSecond = ConvertUtility.ToInt32(dataReader["TimelineSecond"]); service.CreatedDate = ConvertUtility.ToDateTime(dataReader["CreatedDate"]); service.CreatedBy = ConvertUtility.ToInt32(dataReader["CreatedBy"]); service.ModifiedDate = ConvertUtility.ToDateTime(dataReader["ModifiedDate"]); service.ModifiedBy = ConvertUtility.ToInt32(dataReader["ModifiedBy"]); list.Add(service); } return(list); }
protected void rptData_ItemDataBound(object sender, RepeaterItemEventArgs e) { if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem)) { var curData = (DataRowView)e.Item.DataItem; var litName = (Literal)e.Item.FindControl("litName"); var litTeaser = (Literal)e.Item.FindControl("litTeaser"); var litDatetime = (Literal)e.Item.FindControl("litDatetime"); var imgAvatar = (Image)e.Item.FindControl("imgAvatar"); litName.Text = curData["Content_Name"].ToString(); litTeaser.Text = curData["Content_Teaser"].ToString(); litDatetime.Text = ConvertUtility.ToDateTime(curData["Distribution_CreateDate"]).ToString("dd MMMM yyyy"); var coverInfo = ImageDB.GetCover(ConvertUtility.ToInt32(curData["Content_ID"])); if (coverInfo != null) { var avatar = coverInfo.Image_File; if (avatar.Length > 0) { imgAvatar.ImageUrl = UrlFilter.BuildImageScaleHeight(avatar, 0, 50); } else { imgAvatar.Visible = false; } } else { imgAvatar.Visible = false; } } }
public ComparedUnitType(DataRow row) { this.ComparedId = ConvertUtility.ToInt(row["ComparedId"]); this.UnitId = ConvertUtility.Trim(row["UnitId"]); this.BuildId = ConvertUtility.Trim(row["BuildId"]); this.CX_Axis = ConvertUtility.Trim(row["CX_Axis"]); this.CY_Axis = ConvertUtility.Trim(row["CY_Axis"]); this.CountF = ConvertUtility.Trim(row["CountF"]); this.CountT = ConvertUtility.Trim(row["CountT"]); this.CountW = ConvertUtility.Trim(row["CountW"]); this.CountY = ConvertUtility.Trim(row["CountY"]); this.Area = ConvertUtility.Trim(row["Area"]); this.DirectionTo = ConvertUtility.Trim(row["DirectionTo"]); this.Framework_UnitId = ConvertUtility.Trim(row["Framework_UnitId"]); this.Framework_BuildId = ConvertUtility.Trim(row["Framework_BuildId"]); this.Framework_CX_Axis = ConvertUtility.Trim(row["Framework_CX_Axis"]); this.Framework_CY_Axis = ConvertUtility.Trim(row["Framework_CY_Axis"]); this.Framework_CountF = ConvertUtility.Trim(row["Framework_CountF"]); this.Framework_CountT = ConvertUtility.Trim(row["Framework_CountT"]); this.Framework_CountW = ConvertUtility.Trim(row["Framework_CountW"]); this.Framework_CountY = ConvertUtility.Trim(row["Framework_CountY"]); this.Framework_Area = ConvertUtility.Trim(row["Framework_Area"]); this.Framework_DirectionTo = ConvertUtility.Trim(row["Framework_DirectionTo"]); this.StatusId = ConvertUtility.ToInt(row["StatusId"]); this.ComparedDate = ConvertUtility.ToDateTime(row["ComparedDate"]); }
public EstateFwType(DataRow row) { this.EstateId = ConvertUtility.Trim(row["EstateId"]); this.ScopeId = ConvertUtility.Trim(row["ScopeId"]); this.EstateName = ConvertUtility.Trim(row["EstateName"]); this.Address = ConvertUtility.Trim(row["Address"]); this.Flow = ConvertUtility.ToInt(row["FlowStatus"]); this.Operate = ConvertUtility.ToInt(row["OperateStatus"]); this.Collect_EstateId = ConvertUtility.Trim(row["Collect_EstateId"]); this.Collect_ScopeId = ConvertUtility.Trim(row["Collect_ScopeId"]); this.Collect_EstateName = ConvertUtility.Trim(row["Collect_EstateName"]); this.Collect_Address = ConvertUtility.Trim(row["Collect_Address"]); this.AgencyCom_EstateId = ConvertUtility.Trim(row["AgencyCom_EstateId"]); this.AgencyCom_ScopeId = ConvertUtility.Trim(row["AgencyCom_ScopeId"]); this.AgencyCom_EstateName = ConvertUtility.Trim(row["AgencyCom_EstateName"]); this.AgencyCom_Address = ConvertUtility.Trim(row["AgencyCom_Address"]); this.CreateBy = ConvertUtility.Trim(row["CreateBy"]); this.CreateDate = ConvertUtility.ToDateTime(row["CreateDate"]); this.ModifyBy = ConvertUtility.Trim(row["ModifyBy"]); this.ModifyDate = ConvertUtility.ToDateTime(row["ModifyDate"]); }
protected void rptNewLastest_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemIndex < 0) { return; } DataRowView curData = (DataRowView)e.Item.DataItem; HyperLink lnkTitlelist = (HyperLink)e.Item.FindControl("lnkTitlelist"); Image imglist = (Image)e.Item.FindControl("imglist"); Panel pn = (Panel)e.Item.FindControl("othernews"); if (e.Item.ItemIndex == 0) { if (lang == 1) { lnkTitle.Text = curData["Content_Headline"].ToString(); //ltrTeaser.Text = curData["Content_Teaser"].ToString(); } else { lnkTitle.Text = curData["Content_HeadlineKD"].ToString(); //ltrTeaser.Text = curData["Content_TeaserKD"].ToString(); } //Ảnh đại diện if (string.IsNullOrEmpty(ConvertUtility.ToString(curData["Content_Avatar"]))) { imgAvatar.ImageUrl = "/Images/icon_app52.png"; } else { WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver(); ws.GenerateAvatarThumnail(curData["Content_Avatar"].ToString(), 51, 51); imgAvatar.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(curData["Content_Avatar"].ToString(), 51, 51).Replace("~", ""); } //lnkTitle.NavigateUrl = UrlProcess.GetNewsDetailUrl(lang.ToString(), "detail", width, curData["Distribution_ID"].ToString()); lnkTitle.NavigateUrl = UrlProcess.TinTucChiTiet(ConvertUtility.ToInt32(curData["Distribution_ID"].ToString()), curData["Content_Headline"].ToString()); ltrTime.Text = ConvertUtility.ToDateTime(curData["Content_CreateDate"]).ToString("dd/MM/yyyy HH:mm"); pn.Visible = false; } else { if (lang == 1) { lnkTitlelist.Text = curData["Content_Headline"].ToString(); } else { lnkTitlelist.Text = curData["Content_HeadlineKD"].ToString(); } //lnkTitlelist.NavigateUrl = UrlProcess.GetNewsDetailUrl(lang.ToString(), "detail", width, curData["Distribution_ID"].ToString()); lnkTitlelist.NavigateUrl = UrlProcess.TinTucChiTiet(ConvertUtility.ToInt32(curData["Distribution_ID"].ToString()), curData["Content_Headline"].ToString()); pn.Visible = true; } }
public UserInfoType(DataRow row) { this.UserInfoId = ConvertUtility.Trim(row["UserInfoId"]); this.UserName = ConvertUtility.Trim(row["UserName"]); this.RoleInfoId = ConvertUtility.ToInt(row["RoleInfoId"]); this.StatusInfoId = ConvertUtility.ToInt(row["StatusInfoId"]); this.CreateDate = ConvertUtility.ToDateTime(row["CreateDate"]); }
protected void Page_Load(object sender, EventArgs e) { preurl = ConfigurationSettings.AppSettings.Get("urldata"); width = Request.QueryString["w"]; id = ConvertUtility.ToInt32(Request.QueryString["id"]); if (!IsPostBack) { lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); //Detail //DataTable dtDetail = TintucController.GetNewsDetailHasCache(id); //catID = ConvertUtility.ToInt32(dtDetail.Rows[0]["Distribution_ZoneID"]); //DataTable catInfo = TintucController.GetCategoryByCatIDHasCache(catID); DataSet ds = ThethaoController.GetNewsDetailHasCache(id); DataTable dtInfor = ds.Tables[0]; DataTable dtList = ds.Tables[1]; //end detail if (lang == 1) { //lnkCatName.Text = catInfo.Rows[0]["Zone_Name"].ToString().ToUpper(); lblCat.Text = "TIN ĐÃ ĐĂNG"; lblHeadline.Text = dtInfor.Rows[0]["Content_Headline"].ToString(); ltrBody.Text = ReplaceImageSource(dtInfor.Rows[0]["Content_Body"].ToString()); lnkHomeChannel.Text = "TIN TỨC"; } else { lblHeadline.Text = dtInfor.Rows[0]["Content_HeadlineKD"].ToString(); ltrBody.Text = ReplaceImageSource(dtInfor.Rows[0]["Content_BodyKD"].ToString()); //lnkCatName.Text = catInfo.Rows[0]["Zone_Alias"].ToString().ToUpper(); } if (!string.IsNullOrEmpty(dtInfor.Rows[0]["Content_Avatar"].ToString())) { //WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver(); //ws.GenerateAvatarThumnail(dtDetail.Rows[0]["Content_Avatar"].ToString(), 60, 60); //imgAvatar.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(dtDetail.Rows[0]["Content_Avatar"].ToString(), 60, 60).Replace("~", ""); imgAvatar.ImageUrl = AppEnv.GetAvatarTheThaoSo(dtInfor.Rows[0]["Content_Avatar"].ToString(), 60, 60); } else { imgAvatar.Visible = false; } lblCreatedOn.Text = ConvertUtility.ToDateTime(dtInfor.Rows[0]["Content_CreateDate"]).ToString("dd/MM/yyyy hh:mm"); //lnkCatName.NavigateUrl = UrlProcess.GetNewsCategoryUrl(lang.ToString(), width, catID.ToString()); lnkHomeChannel.NavigateUrl = UrlProcess.GetLastestNewsTheThaoSo(lang.ToString(), width); //start Older News rptlstCategory.DataSource = dtList; rptlstCategory.ItemDataBound += rptlstCategory_ItemDataBound; rptlstCategory.DataBind(); //start Older News } }
public UserInfo(string cookieStr) { string[] cookie = cookieStr.Split(new string[] { Seperator.FirstChar }, StringSplitOptions.RemoveEmptyEntries); this.UserId = ConvertUtility.Trim(cookie[0]); this.UserName = cookie[1]; this.Role = (MemberRole)Enum.Parse(typeof(MemberRole), cookie[2]); this.Status = (MemberStatus)Enum.Parse(typeof(MemberStatus), cookie[3]); this.CreateDate = ConvertUtility.ToDateTime(cookie[4]); }
protected void dtgPix_ItemDataBound(object sender, DataGridItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { DataRowView curData = (DataRowView)e.Item.DataItem; e.Item.Cells[2].Text = ConvertUtility.ToString(e.Item.DataSetIndex + 1); TextBox txtUrl = (TextBox)e.Item.FindControl("txtUrl"); Image imgAvatar = (Image)e.Item.FindControl("imgAvatar"); Label lblDatetime = (Label)e.Item.FindControl("lblDatetime"); TextBox txtPriority = (TextBox)e.Item.FindControl("txtPriority"); Image imgUser = (Image)e.Item.FindControl("imgUser"); var chkCover = (CheckBox)e.Item.FindControl("chkCover"); txtUrl.Text = "http://" + Request.Url.Host + curData["Image_File"]; string tooltip = "<b>" + curData["Image_Name"] + "</b><br />" + "FileSize: " + curData["Image_FileSize"] + " KB" + "\n" + "Dimension: " + curData["Image_Width"] + " x " + curData["Image_Height"] + "\n\n" + curData["Image_Description"]; string avatar = ConvertUtility.ToString(curData["Image_File"]); if (string.IsNullOrEmpty(avatar)) { imgAvatar.Visible = false; } else { imgAvatar.Visible = true; imgAvatar.ImageUrl = avatar; imgAvatar.AlternateText = tooltip; } lblDatetime.Text = ConvertUtility.ToDateTime(curData["Image_CreateDate"]).ToString("dd/MM/yyyy HH:mm"); txtPriority.Text = curData["Priority"].ToString(); chkCover.Checked = ConvertUtility.ToBoolean(curData["IsCover"]); string userEmail = ConvertUtility.ToString(UserDB.GetEmailByID(ConvertUtility.ToInt32(curData["User_ID"]))); if (string.IsNullOrEmpty(userEmail)) { imgUser.Visible = false; } else { imgUser.Visible = true; imgUser.ToolTip = userEmail; } var btn_delete = (WebControl)e.Item.FindControl("btn_delete"); btn_delete.Attributes.Add("onclick", MiscUtility.DELETE_CONFIRM); e.Item.Attributes.Add("onmouseover", "this.className='Hoverrow';"); if (e.Item.ItemType == ListItemType.AlternatingItem) { e.Item.Attributes.Add("onmouseout", "this.className='DarkRow';"); } else { e.Item.Attributes.Add("onmouseout", "this.className='LightRow';"); } } }
protected void rptlst_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemIndex < 0) { return; } string curData = (string)e.Item.DataItem; HyperLink lnkCity = (HyperLink)e.Item.FindControl("lnkCity"); DataTable info = XosoController.GetInfobyCompanyID(ConvertUtility.ToInt32(curData)); HyperLink lnkxkq = (HyperLink)e.Item.FindControl("lnkxkq"); HyperLink lnkkqc = (HyperLink)e.Item.FindControl("lnkkqc"); HyperLink lnksc = (HyperLink)e.Item.FindControl("lnksc"); //HyperLink lnks2DangKy = (HyperLink)e.Item.FindControl("lnkS2DangKy"); //Panel pnlXoSoList = (Panel)e.Item.FindControl("pnlXsList"); //if (Session["msisdn"] != null) //{ // string dkXoSo = string.Format(AppEnv.GetSetting("S2DK_XS"), info.Rows[0]["Company_Comment"]); // string value = AppEnv.GetRegisterService(Session["msisdn"].ToString(), dkXoSo); // if (value == "1") // { // pnlXoSoList.Visible = false; // } //} lnkCity.Text = info.Rows[0]["company_name"].ToString(); lnkkqc.Text = "Kết quả chờ"; //lnksc.Text = Resources.Resource.xsSoiCau; lnksc.Text = "Thống kê cặp số"; //lnkxkq.NavigateUrl = lnkCity.NavigateUrl = "../KQXS.aspx?id=" + info.Rows[0]["company_id"] + "&day=" + day + "&lang=" + lang + "&w=" + width; lnkxkq.NavigateUrl = lnkCity.NavigateUrl = UrlProcess.XoSoChiTietNew(ConvertUtility.ToInt32(info.Rows[0]["company_id"].ToString()), day.ToString(), Constant.XoSo_Kqxs_Rewrite); //string content1 = cpid + "&" + Constant.xoso + curData + "@" + day + "&" + kqxsprice + "&" + vmstransactionid; //lnkkqc.NavigateUrl = "../KQCho.aspx?id=" + info.Rows[0]["company_id"] + "&lang=" + lang + "&w=" + width; lnkkqc.NavigateUrl = UrlProcess.XoSoChiTiet(ConvertUtility.ToInt32(info.Rows[0]["company_id"]), Constant.XoSo_KqCho_Rewrite); //lnksc.NavigateUrl = "../SoiCau.aspx?id=" + info.Rows[0]["company_id"].ToString() + "&lang=" + lang + "&w=" + width; //lnks2DangKy.NavigateUrl = UrlProcess.GetS2RegisterXoSoUrl2G(lang.ToString(), width,info.Rows[0]["company_id"].ToString()); //lnksc.NavigateUrl = "/Xoso/ThongKe.aspx?id=" + info.Rows[0]["company_id"] + "&lang=" + lang + "&w=" + width; lnksc.NavigateUrl = UrlProcess.XoSoChiTiet(ConvertUtility.ToInt32(info.Rows[0]["company_id"].ToString()), Constant.XoSo_ThongKe_Rewrite); if (day == 0) { lnkxkq.Text = Resources.Resource.xsKQKyTruoc + " (" + ConvertUtility.ToDateTime(XosoController.GetKQXSLastestDetailbyCompanyID(ConvertUtility.ToInt32(ConvertUtility.ToInt32(info.Rows[0]["company_id"]))).Rows[0]["lot_time"]).ToString("dd/MM") + ")"; } else { lnkxkq.Text = "Kết quả " + "(" + ConvertUtility.ToDateTime(DateTime.Now.AddDays(-day)).ToString("dd/MM") + ")"; } }
public OrderType(DataRow row) { this.OrderId = ConvertUtility.ToInt(row["OrderId"]); this.EstateId = ConvertUtility.Trim(row["EstateId"]); this.StatusId = ConvertUtility.ToInt(row["StatusId"]); this.CreateBy = ConvertUtility.Trim(row["CreateBy"]); this.CreateDate = ConvertUtility.ToDateTime(row["CreateDate"]); this.CompletedBy = ConvertUtility.Trim(row["CompletedBy"]); this.CompletedDate = ConvertUtility.ToDateTime(row["CompletedDate"]); }
protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); if (!IsPostBack) { var isTemp = contentInfo.Content_IsTemp; if (!isTemp) { trRank.Visible = false; spanDisableHeader.Visible = false; chkVisible.Checked = contentInfo.Content_Visible; } else { chkVisible.Checked = true; } txtName.Text = contentInfo.Content_Name; txtTeaser.Text = contentInfo.Content_Teaser; Editor1.HtmlValue = contentInfo.Content_Body; txtCreateDate.Text = contentInfo.Content_CreateDate.ToString(); MiscUtility.SetSelected(dropZones.Items, contentInfo.Content_OriginalZoneID.ToString()); txtAuthor.Text = contentInfo.Content_Author; txtEventDate.Text = contentInfo.Content_EventDate.ToShortDateString(); Calendar1.SelectedDate = ConvertUtility.ToDateTime(contentInfo.Content_EventDate.ToShortDateString()); txtFriendlyUrl.Text = contentInfo.Content_FriendlyUrl; chkExcludeFromSearch.Checked = contentInfo.Content_ExcludeFromSearch; chkIsPhoto.Checked = contentInfo.Content_IsPhoto; chkIsDownload.Checked = contentInfo.Content_IsDownload; chkIsVideo.Checked = contentInfo.Content_IsVideo; chkIsPoll.Checked = contentInfo.Content_IsPoll; chkIsProduct.Checked = contentInfo.Content_IsProduct; string zoneDeployed = "|"; DataTable dtZoneDeployed = DistributionDB.GetZoneDeployed(contentInfo.Content_ID); foreach (DataRow row in dtZoneDeployed.Rows) { zoneDeployed += row["Distribution_ZoneID"] + "|"; } foreach (ListItem item in lstZones.Items) { if (zoneDeployed.IndexOf("|" + item.Value + "|") >= 0) { item.Selected = true; } else { item.Selected = false; } } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); if (lang == 1) { lblTitle.Text = "THƯ GIÃN"; //ltrGia.Text = "(" + Resources.Resource.wThongBaoGia + "Truyện cười " + ConfigurationSettings.AppSettings.Get("relaxprice") + Resources.Resource.wDonViTien + ", Sex và cuộc sống " + ConfigurationSettings.AppSettings.Get("relaxsexprice") + Resources.Resource.wDonViTien + ", Gửi lời yêu thương, Cẩm năng tư vấn " + ConfigurationSettings.AppSettings.Get("relaxtuvanprice") + Resources.Resource.wDonViTien + ")"; } else { lblTitle.Text = "THU GIAN"; //ltrGia.Text = "(" + Resources.Resource.wThongBaoGia + "Truyen cuoi " + ConfigurationSettings.AppSettings.Get("relaxprice") + Resources.Resource.wDonViTien + ", Sex va cuoc song " + ConfigurationSettings.AppSettings.Get("relaxsexprice") + Resources.Resource.wDonViTien + ", Gui loi yeu thuong, Cam nang tu van " + ConfigurationSettings.AppSettings.Get("relaxtuvanprice") + Resources.Resource.wDonViTien + ")"; } // //Sửa bỏi Bình Trần - 25/11/2016 DataTable tbThueBao = WapController.W4A_Subscriber_GetInfo(ConvertUtility.ToString(Session["msisdn"]), 1); if (tbThueBao.Rows.Count > 0) { // lnkDangKy.NavigateUrl = string.Empty; if (lang == 1) { ltrDangKy.Text = "Thuê bao đọc truyện"; lnkDangKy.Text = "Hạn sử dụng tới " + ConvertUtility.ToDateTime(tbThueBao.Rows[0]["ExpiredDate"]).ToString("dd/MM/yyyy HH:mm"); } else { ltrDangKy.Text = "Thue bao doc truyen"; lnkDangKy.Text = "Han su dung toi " + ConvertUtility.ToDateTime(tbThueBao.Rows[0]["ExpiredDate"]).ToString("dd/MM/yyyy HH:mm"); } } else { // lnkDangKy.NavigateUrl = "../DangKy.aspx?lang=" + lang.ToString() + "&w=" + width; if (lang == 1) { ltrDangKy.Text = "Đăng ký gói 30 ngày đọc truyện “tẹt ga”. Giá: " + ConfigurationSettings.AppSettings.Get("relaxtruyenprice") + Resources.Resource.wDonViTien + "/tháng"; // ltrDK.Text = "» Đăng ký «"; } else { ltrDangKy.Text = "Dang ky goi 30 ngay doc truyen “tet ga”. Gia: " + ConfigurationSettings.AppSettings.Get("relaxtruyenprice") + Resources.Resource.wDonViTien_KD + "/thang"; // ltrDK.Text = "» Dang ky «"; } } } //lastest News //DataTable dtlatest = TintucController.GetTopNewsHasCache(ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("relax_zoneiddefaut")), 6); //rptlastest.DataSource = dtlatest; //rptlastest.ItemDataBound += new RepeaterItemEventHandler(rptlastest_ItemDataBound); //rptlastest.DataBind(); }
protected void dtgData_ItemDataBound(object sender, DataGridItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { var curData = (DataRowView)e.Item.DataItem; e.Item.Cells[1].Text = ConvertUtility.ToString(e.Item.DataSetIndex + 1); var lnkName = (HyperLink)e.Item.FindControl("lnkVideo"); var txtUrl = (TextBox)e.Item.FindControl("txtUrl"); var lblDatetime = (Label)e.Item.FindControl("lblDatetime"); var txtPriority = (TextBox)e.Item.FindControl("txtPriority"); var imgUser = (Image)e.Item.FindControl("imgUser"); lnkName.Text = curData["Video_Name"].ToString(); if (curData["Video_Type"].ToString() == "youtube") { txtUrl.Text = curData["Video_YouTube"].ToString(); } else { txtUrl.Text = "http://" + Request.Url.Host + curData["Video_File"]; } lblDatetime.Text = ConvertUtility.ToDateTime(curData["Video_CreateDate"]).ToString("dd/MM/yyyy HH:mm"); txtPriority.Text = curData["Priority"].ToString(); string userEmail = ConvertUtility.ToString(UserDB.GetEmailByID(ConvertUtility.ToInt32(curData["User_ID"]))); if (string.IsNullOrEmpty(userEmail)) { imgUser.Visible = false; } else { imgUser.Visible = true; imgUser.ToolTip = userEmail; } var btn_delete = (WebControl)e.Item.FindControl("btn_delete"); btn_delete.Attributes.Add("onclick", MiscUtility.DELETE_CONFIRM); e.Item.Attributes.Add("onmouseover", "this.className='Hoverrow';"); if (e.Item.ItemType == ListItemType.AlternatingItem) { e.Item.Attributes.Add("onmouseout", "this.className='DarkRow';"); } else { e.Item.Attributes.Add("onmouseout", "this.className='LightRow';"); } } }
protected void rptlist_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemIndex < 0) { return; } DataRowView curData = (DataRowView)e.Item.DataItem; Label ltrGame = (Label)e.Item.FindControl("ltrGame"); Literal ltrTime = (Literal)e.Item.FindControl("ltrTime"); HyperLink lnkTuVan = (HyperLink)e.Item.FindControl("lnkTuVan"); HyperLink lnkThongke = (HyperLink)e.Item.FindControl("lnkThongke"); HyperLink lnkKQCho = (HyperLink)e.Item.FindControl("lnkKQCho"); //if (lang == 1) //{ ltrGame.Text = "<span class=\"bold\">" + curData["Team_Name1"].ToString() + " ? - ? " + curData["Team_Name2"].ToString() + "</span>"; lnkTuVan.Text = "Tư vấn"; lnkThongke.Text = "Thống kê"; lnkKQCho.Text = "<span class=\"blue bold\">KQ chờ</span>"; //} //else //{ // ltrGame.Text = "<span class=\"bold\">" + UnicodeUtility.UnicodeToKoDau(curData["Team_Name1"].ToString()) + " ? - ? " + UnicodeUtility.UnicodeToKoDau(curData["Team_Name2"].ToString()) + "</span>"; // lnkTuVan.Text = "Tu van"; // lnkThongke.Text = "Thong ke"; // lnkKQCho.Text = "<span class=\"blue bold\">KQ cho</span>"; //} if (ThethaoController.GetDetail_YKCG_ByGameID(curData["PK_Game_ID"].ToString()).Rows.Count > 0) { lnkThongke.Text = "<span class=\"blue bold\">" + lnkThongke.Text + "</span>"; //lnkThongke.NavigateUrl = "../ThongKe.aspx?id=" + curData["Sport_Id"].ToString() + "&lang=" + lang + "&w=" + width; lnkThongke.NavigateUrl = UrlProcess.TheThaoThongKe(curData["Sport_Id"].ToString()); } else { lnkThongke.Text = "<span class=\"gray bold\">" + lnkThongke.Text + "</span>"; lnkThongke.Enabled = false; } DataTable tip = ThethaoController.GetDetail_Tip_ByGameID(curData["PK_Game_ID"].ToString()); if (tip.Rows.Count > 0) { lnkTuVan.Text = "<span class=\"blue bold\">" + lnkTuVan.Text + "</span>"; lnkTuVan.NavigateUrl = "../TuVan.aspx?id=" + curData["Sport_Id"].ToString() + "&lang=" + lang + "&w=" + width; } else { lnkTuVan.Text = "<span class=\"gray bold\">" + lnkTuVan.Text + "</span>"; lnkTuVan.Enabled = false; } lnkKQCho.NavigateUrl = "../KQCho.aspx?id=" + curData["Sport_Id"].ToString() + "&lang=" + lang + "&w=" + width; ltrTime.Text = ConvertUtility.ToDateTime(curData["StartTime"]).ToString("dd/MM/yyyy HH:mm"); }
protected void dtgMail_ItemDataBound(object sender, DataGridItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { DataRowView curData = (DataRowView)e.Item.DataItem; e.Item.Cells[2].Text = ConvertUtility.ToString(e.Item.DataSetIndex + 1); HyperLink lnkName = (HyperLink)e.Item.FindControl("lnkName"); Literal litContent = (Literal)e.Item.FindControl("litContent"); Label lblDatetime = (Label)e.Item.FindControl("lblDatetime"); // Image imgPix = (Image)e.Item.FindControl("imgPix"); // HyperLink lnkPix = (HyperLink)e.Item.FindControl("lnkPix"); lnkName.NavigateUrl = "mailto:" + curData["Mail_Email"]; lnkName.Text = curData["Mail_Name"].ToString(); litContent.Text = HTMLUtility.ReplaceTag(curData["Mail_Content"].ToString()); lblDatetime.Text = ConvertUtility.ToDateTime(curData["Mail_Datetime"]).ToString(); // int pixid = ConvertUtility.ToInt32(curData["Pix_ID"]); // if(pixid == 0) // { // lnkPix.Visible = imgPix.Visible = false; // } // else // { // lnkPix.NavigateUrl = AppEnv.WEB_CMD + "pix" + "&pixid=" + pixid.ToString(); // lnkPix.Target = "_blank"; // string imgurl = DataHelper.GetFieldByID("Gallery_Pix", "Pix_Avatar", "Pix_ID", pixid).ToString(); // imgPix.ImageUrl = imgurl; // } ImageButton btn_delete = (ImageButton)e.Item.FindControl("btn_delete"); //ImageButton btn_updaterow = (ImageButton)e.Item.FindControl("btn_updaterow"); btn_delete.Attributes.Add("onclick", MiscUtility.DELETE_CONFIRM); //if (ConvertUtility.ToInt32(cklevel) == 1) //{ // btn_delete.Enabled = false; // btn_updaterow.Enabled = false; //} e.Item.Attributes.Add("onmouseover", "this.className='Hoverrow';"); if (e.Item.ItemType == ListItemType.AlternatingItem) { e.Item.Attributes.Add("onmouseout", "this.className='DarkRow';"); } else { e.Item.Attributes.Add("onmouseout", "this.className='LightRow';"); } } }