//End //keyword public void InsertT_Keywords(string Keyword, double NewsID, int UserID) { string _sql = "CMS_InsertT_Keywords_Dynamic"; try { string sql = "Delete T_KeyNews where IDNews = " + NewsID; HPCDataProvider.Instance().ExecSql(sql); string[] _Keyword = Keyword.ToString().Trim().Split(','); for (int i = 0; i < _Keyword.Length; i++) { string _key = _Keyword[i].Trim(); if (_key.Length > 1) { SqlService _sqlservice = new SqlService(); _sqlservice.AddParameter("@Keyword", SqlDbType.NVarChar, _key, true); _sqlservice.AddParameter("@NewsID", SqlDbType.Float, NewsID, true); _sqlservice.AddParameter("@UserID", SqlDbType.Float, UserID, true); _sqlservice.ExecuteSP(_sql); _sqlservice.CloseConnect(); _sqlservice.Disconnect(); } } } catch (Exception ex) { throw ex; } }
public void UpdateStatus_T_News_ex_New_HV(double _news_id, int _status, int User_Modify, DateTime Date_Modify) { string strUserID = ""; if (_status == 23) { strUserID = getSenderIDFrom_NewsID_Version(Convert.ToInt32(_news_id), 0, 2); } else if (_status == 73) { strUserID = getSenderIDFrom_NewsID_Version(Convert.ToInt32(_news_id), 0, 7); } if (strUserID == "") { strUserID = User_Modify.ToString(); } try { HPCDataProvider.Instance().ExecStore("[CMS_UpdateStatus_T_News]", new string[] { "@News_ID", "@Status", "@User_Modify", "@Date_Modify" }, new object[] { _news_id, _status, Int32.Parse(strUserID), Date_Modify }); } catch (Exception ex) { throw ex; } }
public string GetTrace(Double News_id) { DataSet _ds = new DataSet(); try { _ds = HPCDataProvider.Instance().ExecSqlDataSet("select LuuVet from T_Tinbai where Ma_Tinbai=" + News_id.ToString()); if (_ds.Tables[0].Rows.Count > 0) { if (_ds.Tables[0].Rows[0][0] == DBNull.Value) { return(""); } else { return(_ds.Tables[0].Rows[0][0].ToString()); } } else { return(""); } } catch (Exception ex) { throw ex; } }
public string getSenderIDFrom_NewsID_Version(int News_ID, int intFieldIndex, int _Status) { try { DataSet ds = HPCDataProvider.Instance().GetStoreDataSet("CMS_getSenderIDFrom_NewsID_Version", new string[] { "@News_ID", "@Status", }, new object[] { News_ID, _Status }); DataTable dt = ds.Tables[0]; if (dt.Rows.Count > 0) { if (intFieldIndex == 0) { return(dt.Rows[0]["News_EditorID"].ToString()); } else { return(dt.Rows[0]["News_DateEdit"].ToString()); } } return(""); } catch (Exception ex) { throw ex; } }
public void grdListCategory_EditCommand(object source, DataGridCommandEventArgs e) { T_Photo_EventDAL _DAL = new T_Photo_EventDAL(); T_Photo_Event _obj = new T_Photo_Event(); TextBox txt_tienNB = e.Item.FindControl("txt_tienNB") as TextBox; int _ID = Convert.ToInt32(grdListCate.DataKeys[e.Item.ItemIndex].ToString()); _obj = _DAL.GetOneFromT_Photo_EventsByID(_ID); if (e.CommandArgument.ToString().ToLower() == "savephoto") { int tien = 0; if (!string.IsNullOrEmpty(txt_tienNB.Text)) { try { tien = int.Parse(txt_tienNB.Text.Replace(",", "")); } catch {; } } if (txt_tienNB.Text.Trim().Length > 0) { string sql = "Update T_Photo_Event set TienNB = " + tien + " where Photo_ID = " + _ID; HPCDataProvider.Instance().ExecSql(sql); string _ActionsCode = "[Thời sự qua ảnh] [Xuất bản ảnh thời sự] [Chấm nhuận bút ảnh trong ngày] [Ảnh: " + _obj.Photo_Name + "]"; WriteLogHistory2Database.WriteHistory2Database(_user.UserID, _user.UserFullName, "[Cập nhật]", Convert.ToInt32(Request["Menu_ID"]), _ActionsCode, _ID, ConstAction.TSAnh); ScriptManager.RegisterStartupScript(this, GetType(), "myFunction", "alert('Bạn đã chấm nhuận bút thành công !');", true); } else { txt_tienNB.Focus(); ScriptManager.RegisterStartupScript(this, GetType(), "myFunction", "alert('Bạn chưa nhập tiêu đề ảnh !');", true); } } }
public bool Check_RoleByAdvID(int _advID, int _catID) { bool _check = false; try { string sql = "select Cat_ID from T_Customer_Ads where ID = " + _advID; DataSet ds = HPCDataProvider.Instance().ExecSqlDataSet(sql); string _list = ds.Tables[0].Rows[0][0].ToString(); char[] sep = { ',' }; string[] sArrProdID = null; if (_list.ToString() != "") { sArrProdID = _list.Split(sep); for (int i = 0; i < sArrProdID.Length; i++) { if (sArrProdID[i].ToString().ToUpper() == _catID.ToString().ToUpper()) { _check = true; break; } } } ds.Clear(); } catch { //throw ex; _check = false; } return(_check); }
public void UpdateStatusDataByID(string _Where) { try { HPCDataProvider.Instance().ExecStore("[CMS_UpdateT_ImageFilesDynamic]", new string[] { "@WhereCondition" }, new object[] { _Where }); } catch { } }
public void DeleteDataByID(double _ID) { try { HPCDataProvider.Instance().ExecStore("[CMS_Delete_Image]", new string[] { "@ImageID" }, new object[] { _ID }); } catch { } }
public void Delete_Image_NewsID(double News_ID) { try { HPCDataProvider.Instance().ExecStore("[CMS_NewsImagesNews_ID]", new string[] { "@News_ID" }, new object[] { News_ID }); } catch { } }
public DataTable BindGridT_NguoiDungNgonNgu(int Ma_Nguoidung) { DataTable _dt = new DataTable(); UltilFunc _untilDAL = new UltilFunc(); DataTable dt = new DataTable(); DataRow dr; dt.Columns.Add(new DataColumn("ID", typeof(int))); dt.Columns.Add(new DataColumn("TenNgonNgu", typeof(string))); dt.Columns.Add(new DataColumn("Role", typeof(bool))); dt.Columns.Add(new DataColumn("RoleGroup", typeof(bool))); dt.Columns.Add(new DataColumn("Mota", typeof(string))); DataSet _ds = null; try { _ds = HPCDataProvider.Instance().GetStoreDataSet("sp_BindGridT_NguoidungLanguagesByUser", new string[] { "@User_ID" }, new object[] { Ma_Nguoidung }); if (_ds != null) { _dt = _ds.Tables[0]; } if (_dt != null && _dt.Rows.Count > 0) { for (int i = 0; i < _dt.Rows.Count; i++) { dr = dt.NewRow(); dr[0] = _dt.Rows[i]["ID"].ToString(); dr[1] = _dt.Rows[i]["TenNgonNgu"].ToString(); if (Convert.ToBoolean(_dt.Rows[i]["Role"])) { dr[2] = true; } else { dr[2] = false; } if (Convert.ToBoolean(_dt.Rows[i]["ingroup"])) { dr[3] = false; } else { dr[3] = true; } dr[4] = _dt.Rows[i]["Mota"].ToString(); dt.Rows.Add(dr); } } } catch (Exception ex) { throw ex; } return(dt); }
public DataSet BindGridT_AnPhamLayout(int PageIndex, int PageSize, string WhereCondition) { try { return(HPCDataProvider.Instance().GetStoreDataSet("[Sp_ListT_AnPhamMau_LayoutDynamic]", new string[] { "@PageIndex", "@PageSize", "@where" }, new object[] { PageIndex, PageSize, WhereCondition })); } catch (Exception ex) { throw ex; } }
public int InsertT_Anphammau_Layout(T_AnPhamMau_Layout _Obj) { try { return(HPCDataProvider.Instance().InsertObjectReturn(_Obj, "[Sp_InsertT_AnPhamMau_Layout]")); } catch (Exception ex) { throw ex; } }
public void DeleteAllTinbai_AnhByMatinbai(double _Matin) { try { HPCDataProvider.Instance().ExecStore("Sp_DeleteAllMa_TinBai", new string[] { "@Ma_TinBai" }, new object[] { _Matin }); } catch (Exception ex) { throw ex; } }
public void UpdateinfoTin_Anh(string WhereCondition) { try { HPCDataProvider.Instance().ExecStore("Sp_InsertTinbai_AnhDynamic", new string[] { "@WhereCondition" }, new object[] { WhereCondition }); } catch (Exception ex) { throw ex; } }
public void InsertUpdateTin_Anh(T_Tinbai_Anh _Obj) { try { HPCDataProvider.Instance().InsertObject(_Obj, "Sp_InsertT_Tinbai_Anh"); } catch (Exception ex) { throw ex; } }
public void UpdateT_LichsuThanhtoan(int id, double sotien, DateTime Ngaythu, int nguoithu, string Nguoithanhtoan) { try { HPCDataProvider.Instance().ExecStore("Sp_UpdateT_LichsuThanhtoanDynamic", new string[] { "@ID", "@SOTIEN", "@NGAYTHU", "@NGUOITHU", "@TENNGUOINOP" }, new object[] { id, sotien, Ngaythu, nguoithu, Nguoithanhtoan }); } catch (Exception ex) { throw ex; } }
public DataSet BindGridT_LichsuThanhtoan(int PageIndex, int PageSize, string WhereCondition) { try { return(HPCDataProvider.Instance().GetStoreDataSet("Sp_ListT_LichsuThanhtoanDynamic", new string[] { "@PageIndex", "@PageSize", "@where" }, new object[] { PageIndex, PageSize, WhereCondition })); } catch (Exception ex) { throw ex; } }
public T_AnPhamMau_Layout GetOneFromT_AnPhamMau_LayoutByID(Int32 ID) { try { return((T_AnPhamMau_Layout)HPCDataProvider.Instance().GetObjectByID(ID.ToString(), "T_AnPhamMau_Layout", "ID")); } catch (Exception ex) { throw ex; } }
public void DeleteFromT_AnPhamMau_LayoutByID(Int32 ID) { try { HPCDataProvider.Instance().ExecStore("[Sp_DeleteOneFromT_AnPhamMau_Layout]", new string[] { "@ID" }, new object[] { ID }); } catch (Exception ex) { throw ex; } }
public void DeleteFromT_ChucnangByID(Int32 ID) { try { HPCDataProvider.Instance().ExecStore("Sp_DeleteOneFromT_Chucnang", new string[] { "@Ma_Chucnang" }, new object[] { ID }); } catch (Exception ex) { throw ex; } }
public T_LichsuThanhtoan GetOneFromT_LichsuthanhtoanByID(Int32 ID) { try { return((T_LichsuThanhtoan)HPCDataProvider.Instance().GetObjectByID("Sp_SelectOneFromT_LichsuThanhtoan", ID.ToString(), "T_LichsuThanhtoan", "ID")); } catch (Exception ex) { throw ex; } }
public void UpdateRow_T_Chucnang(T_Chucnang _T_Chucnang) { try { HPCDataProvider.Instance().UpdateObject(_T_Chucnang); } catch (Exception ex) { throw ex; } }
public void Sp_DeleteOneFromT_LichsuThanhtoan(int _Id) { try { HPCDataProvider.Instance().ExecStore("Sp_DeleteOneFromT_LichsuThanhtoan", new string[] { "@ID" }, new object[] { _Id }); } catch (Exception ex) { throw ex; } }
public DataSet Bind_T_Album_CategoriesDynamic(int PageIndex, int PageSize, string WhereCondition) { try { return(HPCDataProvider.Instance().GetStoreDataSet("[CMS_ListT_Album_CategoriesDynamic]", new string[] { "@PageIndex", "@PageSize", "@where" }, new object[] { PageIndex, PageSize, WhereCondition })); } catch (Exception ex) { throw ex; } }
public DataSet ListPhotoByMatinbai(string _where) { try { return(HPCDataProvider.Instance().GetStoreDataSet("Sp_ListPhotosOfNews", new string[] { "@WhereCondition" }, new object[] { _where })); } catch (Exception ex) { throw ex; } }
public void DeleteFrom_T_Album_Categories(Int32 ID) { try { HPCDataProvider.Instance().ExecStore("[CMS_DeleteOneFromT_Album_Categories]", new string[] { "@Cat_Album_ID" }, new object[] { ID }); } catch (Exception ex) { throw ex; } }
public DataSet Sp_SelectTinAnhDynamic(string WhereCondition, string order) { try { return(HPCDataProvider.Instance().GetStoreDataSet("Sp_SelectTinAnhDynamic", new string[] { "@WhereCondition", "@OrderByExpression" }, new object[] { WhereCondition, order })); } catch (Exception ex) { throw ex; } }
public void UpdateFromT_T_Album_CategoriesDynamic(string WhereCondition) { try { HPCDataProvider.Instance().ExecStore("[CMS_Update_Album_CategoriesDynamic]", new string[] { "@WhereCondition" }, new object[] { WhereCondition }); } catch (Exception ex) { throw ex; } }
public void DeletePhotosByMaanh(int _Maanh) { try { HPCDataProvider.Instance().ExecStore("Sp_DeletePhotoByMa_Anh", new string[] { "@Ma_Anh" }, new object[] { _Maanh }); } catch (Exception ex) { throw ex; } }
public void Insert_T_Album_Categories_From_T_Album_Categories(int Cat_Album_ID, int CopyFrom, int Lang_Id) { try { HPCDataProvider.Instance().ExecStore("[CMS_Insert_T_Album_Categories_From_T_Album_Categories]", new string[] { "@Cat_Album_ID", "@CopyFrom", "@Lang_Id " }, new object[] { Cat_Album_ID, CopyFrom, Lang_Id }); } catch (Exception ex) { throw ex; } }