protected void SaveActivities() { ActivityBO objActivity = new ActivityBO(); objActivity.UserId = Userid; objActivity.Name = txtActivities.Text; objActivity.Description = txtActivitiesDescription.Text; objActivity.Type = Global.ACTIVITIES; if (System.IO.File.Exists(Server.MapPath("../../Resources/images/ProfileIcons/" + txtActivities.Text + Global.PICTURE_EXTENSION_JPG))) { objActivity.Image = txtActivities.Text + Global.PICTURE_EXTENSION_JPG; } else if (System.IO.File.Exists(Server.MapPath("../../Resources/images/ProfileIcons/" + txtActivities.Text + ".png"))) { objActivity.Image = txtActivities.Text + ".png"; } else { objActivity.Image = "DefaultActivities.png"; } string ActivityId = ActivityBLL.insertActivity(objActivity); txtActivities.Text = ""; txtActivitiesDescription.Text = ""; LoadDataListActivities(); }
public static List <Activity> Get_Activities(string organizationId, string areaId, string projectId, string filter) { List <Activity> theList = new List <Activity>(); if (string.IsNullOrEmpty(areaId)) { areaId = "0"; } if (string.IsNullOrEmpty(projectId)) { projectId = "0"; } if (!string.IsNullOrEmpty(organizationId)) { try { theList = ActivityBLL.GetActivitiesForAutocomplete(Convert.ToInt32(organizationId), Convert.ToInt32(areaId), Convert.ToInt32(projectId), filter); } catch (Exception exc) { log.Error("Error in GetActivitiesForAutocomplete to filter: " + filter + ", organizationId: " + organizationId + ", areaId: " + areaId + " and projectId:" + projectId, exc); } } return(theList); }
public Page<ActivityInvo> GetActivityList(ActivitySerachCondition searchCondition, int pageNum) { this.Session["ActivitySerachCondition"] = searchCondition; ActivityBLL ybll = new ActivityBLL(); Page<ActivityInvo> page = new Page<ActivityInvo>(); return ybll.GetActivityList(searchCondition, pageNum); }
protected void SaveInterests() { ActivityBO objActivity = new ActivityBO(); objActivity.UserId = Userid; objActivity.Name = txtInterests.Text; objActivity.Description = txtInterestsDescription.Text; objActivity.Type = Global.INTERESTS; if (System.IO.File.Exists(Server.MapPath("../../Resources/images/ProfileIcons/" + txtInterests.Text + ".jpg"))) { objActivity.Image = txtInterests.Text + ".jpg"; } else if (System.IO.File.Exists(Server.MapPath("../../Resources/images/ProfileIcons/" + txtInterests.Text + ".png"))) { objActivity.Image = txtInterests.Text + ".png"; } else { objActivity.Image = "DefaultInterests.png"; } string ActivityId = ActivityBLL.insertActivity(objActivity); txtInterests.Text = String.Empty; txtInterestsDescription.Text = String.Empty; LoadDataListInterests(); }
public List<MemberActivityInfo> GetMemberActivity(int activityId) { ActivityBLL activityBLL = new ActivityBLL(); List<MemberActivityInfo> memberActivityList = new List<MemberActivityInfo>(); memberActivityList = activityBLL.GetMemberActivity(activityId); Session["MemberActivityList"] = memberActivityList; return memberActivityList; }
public List<MemberActivityInfo> GetMemberActivity(int activityId) { ActivityBLL ybll = new ActivityBLL(); List<MemberActivityInfo> memberActivity = new List<MemberActivityInfo>(); memberActivity = ybll.GetMemberActivity(activityId); this.Session["MemberActivityList"] = memberActivity; return memberActivity; }
/// <summary> /// 店铺下拉列表 根据用户 /// </summary> /// <param name="Customer"></param> /// <returns></returns> public DataTable ProductLocDDlist(string Customer) { bll.ActivityBLL ab = new ActivityBLL(); DataTable dt = new DataTable(); dt = ab.GetShopAllocationDDlist(Customer); return(dt); }
private void SaveBtn_Click(object sender, EventArgs e) { checklistBLL.InsertChecklist(_cardId, checklistDTOs.Count(), ChecklistTitle.Text, 0); ActivityBLL activityBLL = new ActivityBLL(); //listBLL = new ListBLL(); activityBLL.InsertActivity(Global.user.UserId, Global.id_Board, Global.user.Name + " Has create new checklist " + ChecklistTitle.Text, DateTime.Now); this.Close(); }
protected void LoadDataListActivities() { DListActivities.DataSource = ActivityBLL.getActivityTop5(Global.ACTIVITIES, Userid); DListActivities.DataBind(); if (DListActivities.Items.Count <= 0) { lblActivities.Visible = false; DListActivities.Visible = false; } }
private void ListComponent_MouseClick(object sender, MouseEventArgs e) { ActivityBLL activityBLL = new ActivityBLL(); cardDTO.ListId = _id; cardBLL.UpdateCard(cardDTO); activityBLL.InsertActivity(Global.user.UserId, listBLL.GetList(cardDTO.ListId).BoardId, Global.user.Name + " Has move card to list: " + listBLL.GetList(cardDTO.ListId).Title, DateTime.Now); moveForm.Close(); }
protected void LoadDataListInterests() { DListInterests.DataSource = ActivityBLL.getActivityTop5(Global.INTERESTS, Userid); DListInterests.DataBind(); if (DListInterests.Items.Count <= 0) { lblInterests.Visible = false; DListInterests.Visible = false; } }
private void GetTicketItemCount(HttpContext context) { var ticket = context.Request.QueryString["ticketId"]; if (!string.IsNullOrEmpty(ticket)) { var dic = new ActivityBLL().GetTciektItemCount(long.Parse(ticket), LoginUserId); context.Response.Write(new EMT.Tools.Serialize().SerializeJson(dic)); } }
// Count Group Posts public static int Count_Activities(string term, string UserName, int Month, int Year, string order, int records, int datefilter) { // generate sql query string logic = ActivityBLL.Process_Activity_V3_Logic(term, UserName, Month, Year, datefilter); StringBuilder query = new StringBuilder(); query.Append("Select count(p.activityid) from useractivities as p " + logic); return(Convert.ToInt32(SqlHelper.ExecuteScalar(Config.ConnectionString, CommandType.Text, query.ToString(), new SqlParameter("@username", UserName)))); }
private void LoadActivityData() { int activityId = ActivityId; if (activityId <= 0) { return; } Activity theClass = null; try { theClass = ActivityBLL.GetActivityById(activityId); } catch { SystemMessages.DisplaySystemErrorMessage(Resources.Activity.MessageGetActivity); return; } if (theClass != null) { PermissionObject theUser = new PermissionObject(); try { theUser = PermissionObjectBLL.GetPermissionsByUser(PermissionObject.ObjectType.ACTIVITY.ToString(), activityId); } catch (Exception exc) { SystemMessages.DisplaySystemErrorMessage(exc.Message); Response.Redirect("~/Organization/ListOrganizations.aspx"); } bool readOnly = false; if (theUser == null || !theUser.TheActionList.Exists(i => i.ObjectActionID.Equals("OWN") || i.ObjectActionID.Equals("MANAGE_PROJECT") || i.ObjectActionID.Equals("MAN_ACTIVITY"))) { readOnly = true; } AddDataControl.ReadOnly = readOnly; TitleLiteral.Text = theClass.Name; ActivityNameTextBox.Text = theClass.Name; AddDataControl.OrganizationId = theClass.OrganizationID; AddDataControl.AreaId = theClass.AreaID; AddDataControl.ProjectId = theClass.ProjectID; ActivityNameTextBox.Enabled = !readOnly; RequiredLabel.Visible = !readOnly; } }
/// <summary> /// /// </summary> /// <param name="fc"></param> /// <returns></returns> public ActionResult Index(FormCollection fc) { var from = fc.Get("from"); var to = fc.Get("to"); var name = fc.Get("name"); var dfrom = string.IsNullOrEmpty(from) ? null : (DateTime?)DateTime.Parse(from); var dto = string.IsNullOrEmpty(to) ? null : (DateTime?)DateTime.Parse(to); var user = OperatorProvider.Provider.Current(); var bll1 = new WorkmeetingBLL(); var cnt1 = bll1.GetIndex(user.DeptId, dfrom, dto, name); ViewData["item2"] = cnt1; var bll2 = new ActivityBLL(); var cnt2 = bll2.GetIndex(user.DeptId, dfrom, dto, name); ViewData["item3"] = cnt2; var bll3 = new ToolBorrowBLL(); var cnt3 = bll3.GetList(user.UserId, user.DeptId, dfrom, dto, name); ViewData["item4"] = cnt3.Count(); var bll4 = new DrugBLL(); int cnt4 = bll4.GetOutListCount(user.DeptId, dfrom, dto, name); ViewData["item5"] = cnt4; int total = 0; var bll5 = new LllegalBLL(); int cnt5 = bll5.GetList(user.DeptId, "", "", dfrom, dto, 1, 12, out total).Count(); ViewData["item6"] = total; int total1 = 0; var bll6 = new NoticeBLL(); int cnt6 = bll6.GetAllNotice(user.DeptId, dfrom, dto, name, 1, 12, out total1).Count(); ViewData["item7"] = total1; int total2 = 0; var bll7 = new EmergencyBLL(); int cnt7 = bll7.EmergencyReportGetPageList(user.DeptId, name, dfrom, dto, 1, 12, out total2).Count(); ViewData["item8"] = total2; ViewData["from"] = from; ViewData["to"] = to; ViewData["name"] = name; return(View()); }
public List<ActivityInvo> GetActivityList() { ActivitySerachCondition searchCondition = (Session["ActivitySerachCondition"] as ActivitySerachCondition); ActivityBLL activityBLL = new ActivityBLL(); Page<ActivityInvo> activityPageInfo = new Page<ActivityInvo>(); activityPageInfo = activityBLL.GetActivityList(searchCondition, 0, true); List<ActivityInvo> list = new List<ActivityInvo>(); if (activityPageInfo != null && activityPageInfo.Data != null) { list = activityPageInfo.Data.ToList<ActivityInvo>(); } return list; }
public ActionResult GetDangers(string jobid, int rows) { var page = int.Parse(this.Request.QueryString.Get("page") ?? "1"); var pagesize = int.Parse(this.Request.QueryString.Get("rows") ?? "20"); var total = 0; var user = OperatorProvider.Provider.Current(); var bll = new ActivityBLL(); //var data = bll.GetEvaluationsManoeuvre(name, rows, page, ToCompileDeptIdSearch, EmergencyTypeSearch, meetingstarttime, meetingendtime, out total); var data = workmeetingbll.getdangertemplate(jobid); return(Json(new { rows = data, records = total, page = page, total = Math.Ceiling((decimal)total / rows) }, JsonRequestBehavior.AllowGet)); }
private void SaveBtn_Click(object sender, EventArgs e) { ActivityBLL activityBLL = new ActivityBLL(); listBLL = new ListBLL(); TimeSpan time = new TimeSpan(Convert.ToInt32(this.dueDateHour.Value), Convert.ToInt32(this.dueDateMin.Value), 0); cardDTO.DueDate = DateTime.MinValue; cardDTO.DueDate = datePicker.Value; cardDTO.DueDate = cardDTO.DueDate + time; cardBLL.UpdateDate(cardDTO); activityBLL.InsertActivity(Global.user.UserId, Global.id_Board, Global.user.Name + " Has change date of card " + cardDTO.Title, DateTime.Now); this.Close(); }
private void btnSave_Click(object sender, EventArgs e) { BoardBLL boardBLL = new BoardBLL(); ActivityBLL activityBLL = new ActivityBLL(); String title = tbTitle.Text; int mode = cbMode.SelectedIndex; bool star = false; if (string.IsNullOrEmpty(tbTitle.Text)) { MessageBox.Show("Tiêu đề không được để trống!", "Lỗi!!!", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (this.background == "NULL") { DialogResult r = MessageBox.Show("Bạn có muốn lưu ảnh nền mặc định?", "Cảnh báo", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (r == DialogResult.OK) { if (cbTeam.SelectedIndex == 0) { //----no team--------- boardBLL.InsertBoard(this.index, title, mode, star, this.background); //add board for this user in user_board int boardID = boardBLL.GetMaxID(); boardBLL.AddUser(Global.user.UserId, boardID); activityBLL.InsertActivity(Global.user.UserId, boardID, Global.user.Name + " Has create new board: " + title, DateTime.Now); } this.DialogResult = DialogResult.OK; this.Close(); } } else { if (cbTeam.SelectedIndex == 0) { //----no team--------- boardBLL.InsertBoard(this.index, title, mode, star, this.background); //add board for this user in user_board int boardID = boardBLL.GetMaxID(); boardBLL.AddUser(Global.user.UserId, boardID); activityBLL.InsertActivity(Global.user.UserId, boardID, Global.user.Name + " Has create new board: " + title, DateTime.Now); } this.DialogResult = DialogResult.OK; this.Close(); } }
public static int Fetch_Total_Comments(long id, string profileid, int type) { int TotalComments = 0; if (profileid != "") { TotalComments = Convert.ToInt32(members.Return_Value(profileid, "comments")); } else { switch (type) { //case 0: // // videos; // // update video comment statistic // TotalComments = Convert.ToInt32(VideoBLL.Get_Field_Value(id, "comments")); // break; //case 1: // // blogs // TotalComments = Convert.ToInt32(BlogsBLL.Get_Field_Value(id, "comments")); // break; //case 2: // // photos // TotalComments = Convert.ToInt32(PhotosBLLC.Get_Field_Value(id, "comments")); // break; //case 3: // // photo gallerys // TotalComments = Convert.ToInt32(GalleryBLLC.Get_Field_Value(id, "comments")); // break; //case 11: // // QA Question // TotalComments = Convert.ToInt32(QABLL.Get_Field_Value(id, "comments")); // break; //case 13: // // group posts // TotalComments = Convert.ToInt32(Group_Post_BLL.Get_Field_Value(id, "comments")); // break; //case 12: // // QA Answer // TotalComments = Convert.ToInt32(QAnswersBLL.Get_Field_Value(id, "comments")); // break; case 14: // User Activities TotalComments = Convert.ToInt32(ActivityBLL.Get_Field_Value(id, "comments")); break; } } return(TotalComments); }
public IHttpActionResult GetActivity([FromBody] RequestGetActivity request) { var tokenResult = IdentityValid.ValidateToken(request.Token); if (!tokenResult.IsSuccess) { return(Json(tokenResult)); } var bll = new ActivityBLL(); var data = bll.LoadAll(o => o.UserName == tokenResult.userName).OrderByDescending(o => o.Time).Skip(10 * (request.page - 1)).Take(10); return(Json(data)); }
public IHttpActionResult GetActivityDetail([FromBody] RequestGetActivityDetail request) { var tokenResult = IdentityValid.ValidateToken(request.Token); if (!tokenResult.IsSuccess) { return(Json(tokenResult)); } var bll = new ActivityBLL(); var data = bll.Get(o => o.UserName == tokenResult.userName && o.ActivityId == request.ActivityId); return(Json(data)); }
/// <summary> /// 转移员工(更改员工的客户,商机,待办,活动) /// </summary> public bool TransResource(long fromResId, long toResId, long userId) { if (fromResId == toResId) { return(true); } var fromRes = GetResourceById(fromResId); var toRes = GetResourceById(toResId); if (fromRes == null || toRes == null) { return(false); } CompanyBLL accBll = new CompanyBLL(); List <crm_account> accList = accBll.GetBySql <crm_account>("SELECT * from crm_account a where a.delete_time =0 and a.resource_id = " + fromResId.ToString()); if (accList != null && accList.Count > 0) { accList.ForEach(_ => { _.resource_id = toResId; accBll.EditAccount(_, userId); }); } OpportunityBLL oppoBll = new OpportunityBLL(); List <crm_opportunity> oppoList = oppoBll.GetOppoBySql($"SELECT * from crm_opportunity where delete_time =0 and resource_id = {fromResId.ToString()} and status_id not in ({(int)DicEnum.OPPORTUNITY_STATUS.LOST},{(int)DicEnum.OPPORTUNITY_STATUS.CLOSED},{(int)DicEnum.OPPORTUNITY_STATUS.IMPLEMENTED})"); if (oppoList != null && oppoList.Count > 0) { oppoList.ForEach(_ => { _.resource_id = toResId; oppoBll.EdotOpportunity(_, userId); }); } ActivityBLL actBll = new ActivityBLL(); List <com_activity> actList = actBll.GetToListBySql($"select id,name,description from com_activity where delete_time =0 and resource_id = {fromResId.ToString()} and (status_id <> {(int)DicEnum.ACTIVITY_STATUS.COMPLETED} or status_id is null)"); if (actList != null && actList.Count > 0) { actList.ForEach(_ => { _.resource_id = toResId; actBll.EditActivity(_, userId); }); } return(true); }
/// <summary> /// 根据选择的日期获取相应类名, /// </summary> public string ReturnClassName(DateTime chooseDate, DateTime thisDay, long userId) { // 过期 Overlap // 有待办 预定~ Important // 今天 Today // 本月天数无信息 "" string className = ""; if (thisDay.Year != chooseDate.Year || thisDay.Month != chooseDate.Month) { className += "Overlap "; } if (thisDay.Year == DateTime.Now.Year && thisDay.Month == DateTime.Now.Month && thisDay.Day == DateTime.Now.Day) { className += "Today "; } var dBll = new DispatchBLL(); var appList = dBll.GetAppByResDate(userId, thisDay); if (appList != null && appList.Count > 0) { className += "Important"; return(className); } var todoList = new ActivityBLL().GetToListByResDate(userId, thisDay); if (todoList != null && todoList.Count > 0) { className += "Important"; return(className); } var callList = new TicketBLL().GetCallByResDate(userId, thisDay); if (callList != null && callList.Count > 0) { className += "Important"; return(className); } var timeList = new TimeOffPolicyBLL().GetTimeOffByResDate(userId, thisDay); if (timeList != null && timeList.Count > 0) { className += "Important"; return(className); } return(className); }
protected void ActivityRepeater_ItemCommand(object source, RepeaterCommandEventArgs e) { int activityId = 0; try { activityId = Convert.ToInt32(e.CommandArgument); } catch (Exception ex) { log.Error("Error getting object id", ex); } if (activityId <= 0) { SystemMessages.DisplaySystemErrorMessage(Resources.Organization.MessageNoComplete); return; } if (e.CommandName == "Restore") { try { TrashBLL.RestoreTrash(ActivityHF.Value, activityId); } catch (Exception ex) { SystemMessages.DisplaySystemErrorMessage(ex.Message); return; } ActivityRepeater.DataBind(); } if (e.CommandName == "DeleteActivity") { try { ActivityBLL.DeletePermanently(activityId); } catch (Exception ex) { SystemMessages.DisplaySystemErrorMessage(ex.Message); return; } ActivityRepeater.DataBind(); } }
public ResponseDTO LoadActivityTypes(APICredentials request) { ResponseDTO resp = new ResponseDTO(); using (ProjectManagementBLL objProjectManagementBLL = new ProjectManagementBLL()) { try { APICredentialsBLL credentialsBLL = new APICredentialsBLL(); credentialsBLL.UserName = request.APIUserName; credentialsBLL.Password = request.APIPassword; if (!new CommonMethods().ValidateRequest(credentialsBLL)) { resp.ResponseCode = ResponseCodes.Failed; resp.ResponseMessage = ResponseMessages.InvalidCredentials; } else { DataTable dtRecord = new ActivityBLL().GetAllActivityTypes(objProjectManagementBLL); List <ActivityTypes> acttypes = new List <ActivityTypes>(); if (dtRecord.Rows.Count > 0) { foreach (DataRow row in dtRecord.Rows) { ActivityTypes acttyp = new ActivityTypes(); acttyp.ActTypeID = int.Parse(row["ActTypeID"].ToString()); acttyp.ActivityType = row["ActivityType"].ToString(); acttypes.Add(acttyp); } } resp.ResponseCode = ResponseCodes.Success; resp.ResponseMessage = ResponseMessages.Success; resp.ResponseData = new ResponseData(); resp.ResponseData.activitytypes = acttypes; } } catch (Exception ex) { resp.ResponseCode = ResponseCodes.Failed; resp.ResponseMessage = ex.Message; } } return(resp); }
private void commentButton_Click(object sender, EventArgs e) { if (!String.IsNullOrEmpty(commentText.Text)) { activityBLL = new ActivityBLL(); commentDTO = new CommentDTO(_cardId, Global.user.UserId, commentText.Text, DateTime.Now, 1); try { commentBLL.InsertComment(commentDTO); } catch { MessageBox.Show("Mỗi user chỉ comment 1 lần", "Waring!!!", MessageBoxButtons.OK, MessageBoxIcon.Warning); } UserComment userComment = new UserComment(userBLL.GetUser(Global.user.UserId).Name.Substring(0, 1), commentText.Text); cmtPanel.Controls.Add(userComment); activityBLL.InsertActivity(Global.user.UserId, Global.id_Board, Global.user.Name + " Has comment to card " + cardDTO.Title, DateTime.Now); } }
private void btnSave_Click(object sender, EventArgs e) { ListBLL listBLL = new ListBLL(); if (string.IsNullOrEmpty(tbNameList.Text)) { MessageBox.Show("Please enter title before save list", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } ListDTO l = new ListDTO(this.idBoard, this.index, tbNameList.Text, 1); bool r = listBLL.InsertList(l); ActivityBLL activityBLL = new ActivityBLL(); activityBLL.InsertActivity(Global.user.UserId, this.idBoard, Global.user.Name + " Has create new list: " + this.tbNameList.Text, DateTime.Now); ((ListSpace)this.Parent).LoadListOfThisBoard(); }
private void cbListUser_SelectedIndexChanged(object sender, EventArgs e) { if (cbListUser.SelectedIndex != 0) { BoardBLL boardBLL = new BoardBLL(); ActivityBLL activityBLL = new ActivityBLL(); try { boardBLL.AddUser(userDTOs[cbListUser.SelectedIndex - 1].UserId, this.idBoard); activityBLL.InsertActivity(Global.user.UserId, this.idBoard, Global.user.Name + " Add " + userDTOs[cbListUser.SelectedIndex - 1].Name + " to " + this.title, DateTime.Now); MessageBox.Show("Add succedd" + userDTOs[cbListUser.SelectedIndex - 1].Name + " to " + this.title, "Success!", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch { MessageBox.Show(cbListUser.SelectedText + "already exist in this board!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { this.cbListUser.Visible = false; } }
private void LoadActivity() { if (ActivityId > 0) { Activity theData = null; try { theData = ActivityBLL.GetActivityById(ActivityId); } catch (Exception exc) { SystemMessages.DisplaySystemErrorMessage(exc.Message); } if (theData != null) { OrganizationId = theData.OrganizationID; AreaId = theData.AreaID; ProjectId = theData.ProjectID; } } }
protected void InitData() { ActivityBLL activitybll = new ActivityBLL(); if (WebUserAuth.IsAuthenticated) { this.UserId = WebUserAuth.UserId.Value; TuanDai.PortalSystem.BLL.UserBLL userbll = new TuanDai.PortalSystem.BLL.UserBLL(); userModel = userbll.GetUserBasicInfoModelById(UserId); UserGrowthBLL userGrowthbll = new UserGrowthBLL(); TuanDai.VipSystem.BLL.UserBLL vipuserbll = new TuanDai.VipSystem.BLL.UserBLL(); //List<int> typeList = userGrowthbll.GetUserRecord(UserId); //UserValidInfo Validmodel = vipuserbll.GetUserValidInfo(UserId); this.model = vipuserbll.GetUserInfo(this.UserId); this.GetUserPrivileges(this.model.Level); this.list = new UserPrivilegeBLL().GetUserPrivilegeInfo(this.UserId); this.recordList = activitybll.QueryActivityReceiveRecord(this.UserId); this.strAction = this.GetAction(); if (this.model != null) { this.percent = this.model.Growth == 0 || this.model.CurLevelMaxGrowth == 0 ? "0" : (Convert.ToDecimal(this.model.Growth) / this.model.CurLevelMaxGrowth * 100).ToString("0.00"); } if (list != null) { this.count = list.Select(p => p.TypeId).Distinct().Count(); } else { this.count = 0; } } this.activityList = activitybll.GetActivityList(); this.GetActivityInfo(); }
protected void SaveButton_Click(object sender, EventArgs e) { Activity theClass = new Activity(); theClass.Name = ActivityNameTextBox.Text; theClass.OrganizationID = AddDataControl.OrganizationId; theClass.AreaID = AddDataControl.AreaId; theClass.ProjectID = AddDataControl.ProjectId; if (ActivityId == 0) { //Insert try { ActivityBLL.InsertActivity(theClass); } catch (Exception ex) { SystemMessages.DisplaySystemErrorMessage(ex.Message); return; } SystemMessages.DisplaySystemMessage(Resources.Activity.MessageCreateOk); } else { // Update theClass.ActivityID = ActivityId; try { ActivityBLL.UpdateActivity(theClass); } catch (Exception ex) { SystemMessages.DisplaySystemErrorMessage(ex.Message); return; } SystemMessages.DisplaySystemMessage(Resources.Activity.MessageUpdateOk); } Response.Redirect(ParentPage); }
// update comment statistics version 2.0 -> more scalable public static void Update_Comment_Statistics(long id, int type, int comments) { switch (type) { //case 0: // // videos; // // update video comment statistic // VideoBLL.Update_Field(id, comments.ToString(), "comments"); // break; //case 1: // // blogs // BlogsBLL.Update_Field(id, comments.ToString(),"comments"); // break; //case 2: // // photos // // update photo comment statistic // PhotosBLLC.Update_Field(id, comments.ToString(), "comments"); // update photo comments // break; //case 3: // // photo gallerys // GalleryBLLC.Update_Field(id, comments.ToString(),"comments"); // update gallery comments // break; //case 11: // // QA Question // QABLL.Update_Field(id, comments.ToString(), "comments"); // break; //case 13: // // group posts // Group_Post_BLL.Update_Field(id, comments,"comments"); // break; //case 12: // // QA Anser // QAnswersBLL.Update_Field(id, comments.ToString(), "comments"); // break; case 14: // User Channel Activities ActivityBLL.Update_Field(id, comments.ToString(), "comments"); break; } }
private void LoadData() { //-- verify is user is OWNER //PermissionObject theUser = new PermissionObject(); //try //{ // theUser = PermissionObjectBLL.GetPermissionsByUser(PermissionObject.ObjectType.ACTIVITY.ToString(), Convert.ToInt32(ActivityIdHiddenField.Value)); //} //catch (Exception exc) //{ // SystemMessages.DisplaySystemErrorMessage(exc.Message); // Response.Redirect("~/Activity/ActivitiesList.aspx"); //} //if (theUser == null || !theUser.TheActionList.Exists(i => i.ObjectActionID.Equals("OWN"))) //{ // SystemMessages.DisplaySystemWarningMessage(Resources.DataDetails.UserNotOwner); // Response.Redirect("~/Activity/ActivitiesList.aspx"); //} //-- show Data Activity theData = null; try { theData = ActivityBLL.GetActivityById(Convert.ToInt32(ActivityIdHiddenField.Value)); } catch (Exception exc) { log.Error(exc.Message); SystemMessages.DisplaySystemErrorMessage(Resources.DataDetails.MessageErrorGetActivity); Response.Redirect("~/Activity/ActivitiesList.aspx"); } if (theData != null) { TitleLabel.Text = theData.Name; } }
protected void ExcelBt_Click(object sender, EventArgs e) { ActivitySerachCondition searchCondition = this.Session["ActivitySerachCondition"] as ActivitySerachCondition; ActivityBLL ybll = new ActivityBLL(); Page<ActivityInvo> page = new Page<ActivityInvo>(); page = ybll.GetActivityList(searchCondition, 0, true); List<ActivityInvo> list = new List<ActivityInvo>(); if ((page != null) && (page.Data != null)) { list = page.Data.ToList<ActivityInvo>(); } if ((list != null) && (list.Count > 0)) { ExcelEdit exelTools = new ExcelEdit(); exelTools.CreateExcel(); exelTools.WriteActivityList(list, 0, list.Count - 1); Random random = new Random(); string fileName = base.Server.MapPath(".") + "/ActivityList_" + random.Next(1000).ToString() + ".xls"; exelTools.ExplortExcel(fileName); this.ImportExcel(fileName, exelTools); } }
public bool UpdateActivity(ActivityInvo activityInfo) { ActivityBLL ybll = new ActivityBLL(); return ybll.UpdateActivity(activityInfo); }
public ActivityInvo GetActivityById(int activityId) { ActivityBLL ybll = new ActivityBLL(); return ybll.GetActivityById(activityId); }
public bool DeleteActivity(int activityId) { ActivityBLL ybll = new ActivityBLL(); return ybll.DeleteActivity(activityId); }
public bool DeleteMemberActivity(int memberActivityId) { ActivityBLL activityBLL = new ActivityBLL(); return activityBLL.DeleteMemberActivity(memberActivityId); }
public List<ActivityInvo> GetActivityInvoList() { ActivityBLL activityBLL = new ActivityBLL(); return activityBLL.GetActivityInvoList(); }
public List<MemberActivityInfo> GetMemberActivity() { ActivityBLL activityBLL = new ActivityBLL(); return activityBLL.GetMemberActivity(MemberInfo.MemberCode); }
public bool DeleteMemberActivity(int memberActivityId) { ActivityBLL ybll = new ActivityBLL(); return ybll.DeleteMemberActivity(memberActivityId); }
public bool AddActivityMember(List<MemberActivityInfo> memberActivityList, List<MemberActivityInfo> UpdateActivityList, int activityId) { ActivityBLL ybll = new ActivityBLL(); return ybll.AddAcitivityMember(memberActivityList, UpdateActivityList, activityId); }
public object AddActivity(ActivityInvo activityInfo) { ActivityBLL ybll = new ActivityBLL(); return ybll.AddActivity(activityInfo); }