Пример #1
0
        public AjaxMessage GetDetailsById(string inviteId)
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;
            ajax.Message   = "信息异常,请稍候再试...";

            try
            {
                if (!string.IsNullOrEmpty(inviteId))
                {
                    var m_invite = _inviteService.GetDataListById(inviteId.ToInt32()).FirstOrDefault();
                    if (m_invite != null)
                    {
                        ajax.IsSuccess = true;
                        ajax.Message   = m_invite.InviteContent;
                    }
                }
            }
            catch (Exception e)
            {
                ajax.Message = e.Message;
            }

            return(ajax);
        }
Пример #2
0
        public AjaxMessage SaveLoginCookie(string loginName, string passWord, bool state)
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;
            ajax.Message   = "";
            try
            {
                if (state)
                {
                    ajax.IsSuccess = true;
                    StringControl.DeleteCookie("Employee");
                    HttpCookie cookie = new HttpCookie("Employee");
                    cookie.Values.Add("Name", loginName);
                    cookie.Values.Add("Pwd", passWord);
                    cookie.Values.Add("State", state.ToString());
                    cookie.Expires = System.DateTime.Now.AddDays(7);
                    HttpContext.Current.Response.Cookies.Add(cookie);
                }
                else
                {
                    StringControl.DeleteCookie("Employee");
                    ajax.IsSuccess = true;
                }
            }
            catch (Exception e)
            {
                ajax.Message = e.Message;
            }

            return(ajax);
        }
Пример #3
0
        public AjaxMessage RevocerInvite(string CustomerId)
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;
            ajax.Message   = "信息异常,请稍候再试...";

            try
            {
                if (!string.IsNullOrEmpty(CustomerId))
                {
                    var m_customer = _customerService.GetByGuid(new Guid(CustomerId));
                    m_customer.State = 2;       //邀约中

                    using (TransactionScope scope = new TransactionScope())
                    {
                        //修改客户状态信息
                        _customerService.Update(m_customer);
                        ajax.IsSuccess = true;
                        ajax.Message   = "恢复邀约成功";
                        scope.Complete();
                    }
                }
            }
            catch (Exception e)
            {
                ajax.Message = e.Message;
            }
            return(ajax);
        }
Пример #4
0
        public AjaxMessage DeleteMsg(string mid)
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;
            try
            {
                if (!string.IsNullOrEmpty(mid))
                {
                    int result = _msgService.DeleteMsg(mid);

                    if (result > 0)
                    {
                        ajax.Message   = "删除成功";
                        ajax.IsSuccess = true;
                    }

                    //获取收件人信息条数
                    int count    = _msgService.GetNoReadMsg(LoginInfo.UserInfo.EmployeeId);
                    int allCount = _msgService.GetAllMessage(LoginInfo.UserInfo.EmployeeId, 1).Count;
                    var d        = new { employeeId = LoginInfo.UserInfo.EmployeeId, count = count, allCount = allCount };
                    Microsoft.AspNet.SignalR.GlobalHost.ConnectionManager.GetHubContext <Hubs.MessageHub>().Clients.All.readMsg(d);
                }
            }
            catch (Exception e)
            {
                ajax.Message   = e.Message.ToString();
                ajax.IsSuccess = false;
            }
            return(ajax);
        }
Пример #5
0
        public IActionResult Delete(int?idAboutUs)
        {
            AjaxMessage aMsg = new AjaxMessage();

            if (idAboutUs != null)
            {
                var dropItem = _administrationBLLocator.AboutUsBL.CRUD.GetById(idAboutUs);
                if (dropItem != null)
                {
                    dropItem.OperationIsDeleted = (short)_Enumeration.IsOperationDeleted.Deleted;
                    _administrationBLLocator.AboutUsBL.Save();
                    aMsg.Status  = 1;
                    aMsg.Message = "Kayıt Başarıyla Silinmiştir.";
                }
                else
                {
                    aMsg.Status  = 0;
                    aMsg.Message = "Kayıt Bulunamadı!";
                }
            }
            else
            {
                aMsg.Status  = 0;
                aMsg.Message = "Lütfen departman seçin!";
            }
            return(Json(aMsg));
        }
Пример #6
0
        public AjaxMessage CreateDepartment(Sys_Department _department)
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;
            ajax.Message   = "";
            if (_department != null)
            {
                var parentDepartment = _departmentService.GetByID(_department.Parent);
                _department.EmployeeID = User.Identity.Name.ToInt32();
                _department.CreateTime = DateTime.Now;
                if (_department.Parent == 0)
                {
                    _department.ItemLevel = 1;
                }
                else
                {
                    _department.ItemLevel = parentDepartment.ItemLevel + 1;
                }
                _department.SortOrder = _departmentService.GetMaxSort(_department.ItemLevel.ToString().ToInt32(), _department.Parent.ToString().ToInt32());
                _department.Status    = (byte)SysStatus.Enable;

                int result = _departmentService.Insert(_department);
                if (result > 0)
                {
                    ajax.IsSuccess = true;
                    ajax.Message   = "添加成功";
                }
            }

            return(ajax);
        }
Пример #7
0
        public AjaxMessage UpdateLabel(int labelId, string name)
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;
            ajax.Message   = "";
            try
            {
                FD_HotelLabel m_label = _labelService.GetByID(labelId);
                if (m_label != null)
                {
                    m_label.LabelName = name;
                    int result = _labelService.Update(m_label);
                    if (result > 0)
                    {
                        ajax.IsSuccess = true;
                        ajax.Message   = "修改成功";
                    }
                }
            }
            catch (Exception e)
            {
                ajax.Message = e.Message;
            }

            return(ajax);
        }
Пример #8
0
        public AjaxMessage UpdateSaleType(string SaleTypeId, string SaleTypeName)
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;
            ajax.Message   = "";
            try
            {
                if (!string.IsNullOrEmpty(SaleTypeId))
                {
                    int TypeId = SaleTypeId.ToInt32();
                    //根据Id查询
                    Expression <Func <FD_SaleType, bool> > whereLambda = c => c.SaleTypeID == TypeId;
                    FD_SaleType m_saleType = _SaleTypeService.GetModel(whereLambda);
                    m_saleType.SaleTypeName = SaleTypeName;

                    //执行修改
                    int result = _SaleTypeService.Update(m_saleType);
                    if (result > 0)
                    {
                        ajax.Message   = "修改成功";
                        ajax.IsSuccess = true;
                    }
                }
            }
            catch (Exception e)
            {
                ajax.Message = e.Message;
            }
            return(ajax);
        }
Пример #9
0
        public AjaxMessage GetSaleSourceByTypeID(string saleTypeId)
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;
            ajax.Message   = "";
            try
            {
                if (!string.IsNullOrEmpty(saleTypeId))
                {
                    List <FD_SaleSource> dataList = _SaleSourceSerrvice.GetSourceByTypeId(saleTypeId.ToString().ToInt32());

                    if (dataList != null && dataList.Count > 0)
                    {
                        ajax.IsSuccess = true;
                        ajax.Data      = dataList;
                    }
                }
                else
                {
                    ajax.IsSuccess = true;
                    ajax.Data      = new List <FD_SaleSource>();
                }
            }
            catch (Exception e)
            {
                ajax.Message = e.Message;
                ajax.Data    = new List <FD_SaleSource>();
            }
            return(ajax);
        }
Пример #10
0
        public AjaxMessage CreateSaleSource(FD_SaleSource saleSource)
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;
            ajax.Message   = "";
            try
            {
                if (saleSource != null)
                {
                    saleSource.CreateDate     = DateTime.Now;
                    saleSource.CreateEmployee = LoginInfo.UserInfo.EmployeeId;
                    saleSource.Status         = (byte)SysStatus.Enable;
                    saleSource.letter         = PinYin.GetFirstLetter(saleSource.SourceName);

                    var result = _SaleSourceSerrvice.Add(saleSource);
                    if (result != null)
                    {
                        ajax.Message   = "添加成功";
                        ajax.IsSuccess = true;
                    }
                }
            }
            catch (Exception e)
            {
                ajax.Message = e.Message;
            }
            return(ajax);
        }
Пример #11
0
        public AjaxMessage GetSaleSource(string SaleSourceId)
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;
            ajax.Message   = "";
            try
            {
                if (!string.IsNullOrEmpty(SaleSourceId))
                {
                    FD_SaleSource m_saleSource = _SaleSourceSerrvice.GetById(SaleSourceId.ToString().ToInt32());

                    if (m_saleSource != null)
                    {
                        ajax.IsSuccess = true;
                        ajax.Data      = m_saleSource;
                    }
                    //else
                    //{
                    //    ajax.Data = null;
                    //}
                }
            }
            catch (Exception e)
            {
                ajax.Message = e.Message;
                ajax.Data    = null;
            }
            return(ajax);
        }
Пример #12
0
        public AjaxMessage GetBaseInfo()
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;
            try
            {
                UserHost host = new UserHost();
                //string hostName = Environment.MachineName;
                //string userDominName = Environment.UserDomainName;
                //string userName = Environment.UserName;

                host.hostName  = Dns.GetHostName();
                host.InIp      = Context.Request.UserHostAddress;
                host.loginName = LoginInfo.UserInfo.LoginName;
                host.userName  = Environment.UserName;      //登录用户名称

                ajax.IsSuccess = true;
                ajax.Data      = host;
            }
            catch (Exception e)
            {
                ajax.Message = e.Message.ToString();
            }

            return(ajax);
        }
Пример #13
0
        public AjaxMessage SetThemeTitle(int imgId, int hotelId)
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;
            ajax.Message   = "";

            //前封面图片
            CommonImages image = _imgService.GetTitleImg(hotelId);

            if (image != null)
            {
                image.State = 0;
                _imgService.Update(image);
            }

            //封面图片
            CommonImages uimage = _imgService.GetByID(imgId);

            uimage.State = 1;
            int result = _imgService.Update(uimage);

            if (result > 0)
            {
                //修改酒店封面图片
                FD_Hotel hotel = _hotelService.GetByID(hotelId);
                hotel.HotelThemeImage = uimage.ImgUrl;
                _hotelService.Update(hotel);
                ajax.IsSuccess = true;
                ajax.Message   = "设置成功";
            }

            return(ajax);
        }
Пример #14
0
        public IActionResult Delete(string imageName)
        {
            AjaxMessage aMsg = new AjaxMessage();

            try
            {
                string lowresDirectory    = Path.Combine(_env.WebRootPath, "images\\gallery\\derin\\lowres\\" + imageName);
                string thumbnailDirectory = Path.Combine(_env.WebRootPath, "images\\gallery\\derin\\thumbnail\\" + imageName);

                if (System.IO.File.Exists(thumbnailDirectory) && System.IO.File.Exists(lowresDirectory))
                {
                    System.IO.File.Delete(thumbnailDirectory);
                    System.IO.File.Delete(lowresDirectory);
                    aMsg.Status = 1;
                }
                else
                {
                    aMsg.Status  = 0;
                    aMsg.Message = "Fotoğraf Bulunamadı.";
                }
            }
            catch (Exception ex)
            {
                aMsg.Status  = 0;
                aMsg.Message = "Fotoğraf silme işlemi sırasında bir hata oluştu.";
            }
            return(Json(aMsg));
        }
Пример #15
0
        public JsonResult ExistUsername(string username)
        {
            var member = _memberManager.MakeInstance();

            member.Username = username;
            var status = _memberService.Validate(member);
            var data   = new AjaxMessage();

            if (status == MembershipCreateStatus.Success)
            {
                data.Message = "username is avaiable";
                data.Success = true;
            }
            else
            {
                data.Message = AccountValidation.ErrorCodeToString(status);
                data.Success = false;
            }

            var result = new JsonResult();

            result.Data = data;
            result.JsonRequestBehavior = JsonRequestBehavior.AllowGet;
            return(result);
        }
Пример #16
0
    public AjaxMessageList GetSent(int Page)
    {
        AjaxMessageList ajaxMessageList = new AjaxMessageList();

        try
        {
            Member member = (Member)Session["Member"];


            if (member != null)
            {
                int MessageCount  = Message.GetSentMessageCount(member.MemberID);
                int NumberOfPages = (int)Math.Ceiling(Convert.ToDouble(MessageCount / PageSize));

                if ((MessageCount % PageSize) > 0 || NumberOfPages == 0)
                {
                    NumberOfPages = NumberOfPages + 1;
                }

                Message[] NewMessages = Message.GetSent(member.MemberID, Page, PageSize);
                ajaxMessageList.AjaxMessages  = AjaxMessage.ConvertToAjaxMessage(member, NewMessages, true, GetMessageType.Trash);
                ajaxMessageList.NumberOfPages = NumberOfPages;
                ajaxMessageList.CurrentPage   = Page;
            }
        }
        catch (Exception ex)
        {
        }

        return(ajaxMessageList);
    }
Пример #17
0
    public AjaxMessageList OpenSentMessage(string WebMessageID)
    {
        Member member = (Member)Session["Member"];

        AjaxMessage[] ajaxMessages = null;

        if (member != null)
        {
            // get the message and all other message that have the same InReplyToID
            Message[] messages = Message.GetSentMessageHeaderWithReply(WebMessageID, member.MemberID);

            ajaxMessages = AjaxMessage.ConvertToAjaxMessage(member, messages, false, GetMessageType.ReadMessage);
        }

        AjaxMessageList messageList = new AjaxMessageList();

        messageList.DefaultWebMessageID = WebMessageID;

        //get the video message of the first item
        if (ajaxMessages.Length > 0)
        {
            for (int i = 0; i < ajaxMessages.Length; i++)
            {
                if (ajaxMessages[i].WebMessageID == WebMessageID)
                {
                    messageList.DefaultVideoMessageFile = ajaxMessages[i].VideoMessageFile;
                }
            }
        }

        messageList.AjaxMessages = ajaxMessages;

        return(messageList);
    }
Пример #18
0
        public AjaxMessage InsertHotel(FD_Hotel hotel)
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;
            ajax.Message   = "";
            if (hotel != null)
            {
                bool isExists = _hotelService.IsExists(hotel.HotelName);
                if (isExists == false)          //酒店不存在  就新增
                {
                    hotel.CreateDate = DateTime.Now;
                    hotel.Letter     = PinYin.GetFirstLetter(hotel.HotelName.ToString());
                    hotel.Status     = (byte)SysStatus.Enable;

                    int result = _hotelService.Insert(hotel);
                    if (result > 0)
                    {
                        ajax.IsSuccess = true;
                        ajax.Message   = "添加成功";
                    }
                }
                else
                {
                    ajax.Message = "酒店名称已经存在";
                }
            }

            return(ajax);
        }
Пример #19
0
        public AjaxMessage InsertLabel(string name, int empId)
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;
            ajax.Message   = "";
            try
            {
                if (name != "")
                {
                    FD_HotelLabel m_label = new FD_HotelLabel();
                    m_label.LabelName      = name;
                    m_label.CreateEmployee = empId.ToString().ToInt32();
                    m_label.CreateDate     = DateTime.Now;
                    m_label.Status         = (byte)SysStatus.Enable;
                    int result = _labelService.Insert(m_label);
                    if (result > 0)
                    {
                        ajax.IsSuccess = true;
                        ajax.Message   = "添加成功";
                    }
                }
            }
            catch (Exception e)
            {
                ajax.Message = e.Message;
            }

            return(ajax);
        }
Пример #20
0
        public AjaxMessage SetHotelSingleStatus(int labelId)
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;
            ajax.Message   = "";
            try
            {
                FD_HotelLabel m_label = _labelService.GetByID(labelId);
                if (m_label != null)
                {
                    if (m_label.Status == (byte)SysStatus.Enable)
                    {
                        m_label.Status = (byte)SysStatus.Disable;
                        ajax.Message   = "禁用成功";
                    }
                    else
                    {
                        m_label.Status = (byte)SysStatus.Enable;
                        ajax.Message   = "启用成功";
                    }
                    int result = _labelService.Update(m_label);
                    if (result > 0)
                    {
                        ajax.IsSuccess = true;
                    }
                }
            }
            catch (Exception e)
            {
                ajax.Message = e.Message;
            }

            return(ajax);
        }
Пример #21
0
        public AjaxMessage GetByCustomerID(string customerId)
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;
            try
            {
                if (!string.IsNullOrEmpty(customerId))
                {
                    Guid id         = new Guid(customerId);
                    var  m_customer = _cusService.GetByGuid(id);

                    if (m_customer != null)
                    {
                        ajax.Data      = m_customer;
                        ajax.IsSuccess = true;
                    }
                }
            }
            catch (Exception e)
            {
                ajax.Message = e.Message;
            }
            return(ajax);
        }
Пример #22
0
        public AjaxMessage ModifySingleStatus(string cusId)
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;
            ajax.PageSize  = 10;
            if (!string.IsNullOrEmpty(cusId))
            {
                Guid Id = new Guid(cusId.ToString());

                var cusModel = _customerService.GetByGuid(Id);
                if (cusModel.Status == (byte)SysStatus.Enable)
                {
                    cusModel.Status = (byte)SysStatus.Disable;
                    ajax.Message    = "禁用成功";
                }
                else
                {
                    cusModel.Status = (byte)SysStatus.Enable;
                    ajax.Message    = "启用成功";
                }
                int result = _customerService.Update(cusModel);
                if (result > 0)
                {
                    ajax.IsSuccess = true;
                }
                else
                {
                    ajax.Message = "信息异常,请稍后再试...";
                }
            }
            return(ajax);
        }
Пример #23
0
        public AjaxMessage CreateSaleType(string typeName)
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;
            ajax.Message   = "";
            try
            {
                if (!string.IsNullOrEmpty(typeName))
                {
                    int         EmployeeId = LoginInfo.UserInfo.EmployeeId;
                    FD_SaleType saleType   = new FD_SaleType()
                    {
                        SaleTypeName   = typeName,
                        CreateEmployee = LoginInfo.UserInfo.EmployeeId,
                        CreateDate     = DateTime.Now,
                        Status         = 1
                    };

                    var result = _SaleTypeService.Add(saleType);
                    if (result != null)
                    {
                        ajax.Message   = "添加成功";
                        ajax.IsSuccess = true;
                    }
                }
            }
            catch (Exception e)
            {
                ajax.Message = e.Message;
            }
            return(ajax);
        }
Пример #24
0
        public AjaxMessage GetNoReadMsg()
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;
            ajax.Message   = string.Empty;
            ajax.Value     = "0";
            try
            {
                int EmployeeId = LoginInfo.UserInfo.EmployeeId;
                int count      = _msgService.GetNoReadMsg(EmployeeId);
                //收件人所有信息条数
                int allCount = _msgService.GetAllMessage(LoginInfo.UserInfo.EmployeeId, 1).Count;
                var d        = new { employeeId = LoginInfo.UserInfo.EmployeeId, count = count, allCount = allCount };
                Microsoft.AspNet.SignalR.GlobalHost.ConnectionManager.GetHubContext <Hubs.MessageHub>().Clients.All.readMsg(d);
                int draftCount = _msgService.GetDraftCount(LoginInfo.UserInfo.EmployeeId);

                ajax.Value     = count.ToString();
                ajax.Index     = allCount;
                ajax.Count     = draftCount;
                ajax.IsSuccess = true;
            }
            catch (Exception e)
            {
                ajax.Message = e.Message;
            }

            return(ajax);
        }
Пример #25
0
        public AjaxMessage GetSaleSourceByType(string SaleTypeId)
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;
            ajax.Message   = "";
            try
            {
                if (!string.IsNullOrEmpty(SaleTypeId))
                {
                    int SaleType = SaleTypeId.ToInt32();
                    List <Expression <Func <FD_SaleSource, bool> > > parmList = new List <Expression <Func <FD_SaleSource, bool> > >();
                    parmList.Add(c => c.SaleTypeId == SaleType);
                    var saleSourceList = _saleSourceService.GetListBy(parmList);
                    ajax.IsSuccess = true;
                    ajax.Data      = saleSourceList;
                }
            }
            catch (Exception e)
            {
                ajax.Message = e.Message;
            }

            return(ajax);
        }
Пример #26
0
        public IActionResult Save(ProjectVM model)
        {
            AjaxMessage aMsg = new AjaxMessage();

            if (model != null)
            {
                if (ModelState.IsValid)
                {
                    var    files     = Request.Form.Files;
                    byte[] imageData = null;
                    if (files.Count > 0)
                    {
                        imageData = GetFormImageToByte(files[0]);
                    }

                    Project project = new Project();
                    project.Title              = model.Title;
                    project.Detail             = model.Detail;
                    project.StartDate          = model.StartDate;
                    project.EndDate            = model.EndDate;
                    project.Picture            = imageData != null ? imageData : model.Picture;
                    project.OperationDate      = DateTime.Now;
                    project.OperationIdUserRef = HttpRequestInfo.UserID;
                    project.OperationIP        = HttpRequestInfo.IpAddress;
                    project.OperationIsDeleted = 1;



                    if (model.IdProject == 0)
                    {
                        _administrationBLLocator.ProjectBL.CRUD.Insert(project);
                        _administrationBLLocator.ProjectBL.Save();
                        aMsg.Status  = 1;
                        aMsg.Message = "Kayıt Başarıyla Eklendi.";
                    }
                    else
                    {
                        project.IdProject = model.IdProject;
                        _administrationBLLocator.ProjectBL.CRUD.Update(project, HttpRequestInfo);
                        _administrationBLLocator.ProjectBL.Save();
                        aMsg.Status  = 1;
                        aMsg.Message = "Güncelleme Başarılı.";
                    }
                }
                else
                {
                    aMsg.Status  = 0;
                    aMsg.Message = "Bir Hata oluştu";
                }
            }
            return(Json(aMsg));
        }
Пример #27
0
        public AjaxMessage ReOrderEmployee(string employeeId, string customerId)
        {
            AjaxMessage ajax = new AjaxMessage();

            ajax.IsSuccess = false;

            try
            {
                if (!string.IsNullOrEmpty(customerId) && !string.IsNullOrEmpty(employeeId))
                {
                    //修改 FL_Invite  SS_Report  FL_Order
                    int      rowAffected = 0;
                    string   cus_id      = "";
                    string[] customer    = customerId.Split(',');
                    for (int i = 0; i < customer.Length; i++)
                    {
                        cus_id += "'" + customer[i] + "',";
                    }
                    cus_id = cus_id.Substring(0, cus_id.Length - 1);

                    #region 执行存储过程

                    DBHelper       db     = new DBHelper();
                    SqlParameter[] pars   = new SqlParameter[] { new SqlParameter("@employeeId", employeeId), new SqlParameter("@customerId", cus_id) };
                    int            result = db.RunProcedure("proc_ReOrder", pars, out rowAffected);

                    if (result > 0)
                    {
                        ajax.IsSuccess = true;
                        ajax.Message   = "改派成功";
                    }
                    #endregion
                }
                else
                {
                    if (!string.IsNullOrEmpty(customerId))
                    {
                        ajax.Message = "请选择客户";
                    }
                    else
                    {
                        ajax.Message = "请选择跟单人";
                    }
                }
            }
            catch (Exception e)
            {
                ajax.Message = e.Message;
            }

            return(ajax);
        }
Пример #28
0
    public AjaxMessage[] GetInboxMessages2()
    {
        Member member = (Member)Session["Member"];
        AjaxMessage[] AjaxMessages = new AjaxMessage[0];

        if (member != null)
        {
            Message[] NewMessages = Message.GetAllMessagesByMemberID(member.MemberID, 0, PageSize);
            AjaxMessages = AjaxMessage.ConvertToAjaxMessage(member,NewMessages, true, GetMessageType.Inbox);
        }

        return AjaxMessages;
    }
Пример #29
0
    public AjaxMessage[] GetNewMessages()
    {
        Member member = (Member)Session["Member"];

        AjaxMessage[] AjaxMessages = new AjaxMessage[0];

        if (member != null)
        {
            Message[] NewMessages = Message.GetNewMessages(member.MemberID);
            AjaxMessages = AjaxMessage.ConvertToAjaxMessage(member, NewMessages, true, GetMessageType.Inbox);
        }

        return(AjaxMessages);
    }
Пример #30
0
    public AjaxMessage[] GetInboxMessages2()
    {
        Member member = (Member)Session["Member"];

        AjaxMessage[] AjaxMessages = new AjaxMessage[0];

        if (member != null)
        {
            Message[] NewMessages = Message.GetAllMessagesByMemberID(member.MemberID, 0, PageSize);
            AjaxMessages = AjaxMessage.ConvertToAjaxMessage(member, NewMessages, true, GetMessageType.Inbox);
        }

        return(AjaxMessages);
    }
Пример #31
0
        public IActionResult Save(ContactUsVM model)
        {
            AjaxMessage aMsg = new AjaxMessage();

            if (model != null)
            {
                if (ModelState.IsValid)
                {
                    ContactUs contactUs = new ContactUs();
                    contactUs.Address            = model.Address;
                    contactUs.Email              = model.Email;
                    contactUs.Phone              = model.Phone;
                    contactUs.GSM                = model.GSM;
                    contactUs.Fax                = model.Fax;
                    contactUs.Facebook           = model.Facebook;
                    contactUs.Twitter            = model.Twitter;
                    contactUs.Instagram          = model.Instagram;
                    contactUs.Youtube            = model.Youtube;
                    contactUs.Linkedin           = model.Linkedin;
                    contactUs.OperationDate      = DateTime.Now;
                    contactUs.OperationIdUserRef = HttpRequestInfo.UserID;
                    contactUs.OperationIP        = HttpRequestInfo.IpAddress;
                    contactUs.OperationIsDeleted = 1;



                    if (model.IdContactUs == 0)
                    {
                        _administrationBLLocator.ContactUsBL.CRUD.Insert(contactUs);
                        _administrationBLLocator.ContactUsBL.Save();
                        aMsg.Status  = 1;
                        aMsg.Message = "Kayıt Başarıyla Eklendi.";
                    }
                    else
                    {
                        contactUs.IdContactUs = model.IdContactUs;
                        _administrationBLLocator.ContactUsBL.CRUD.Update(contactUs, HttpRequestInfo);
                        _administrationBLLocator.ContactUsBL.Save();
                        aMsg.Status  = 1;
                        aMsg.Message = "Güncelleme Başarılı.";
                    }
                }
                else
                {
                    aMsg.Status  = 0;
                    aMsg.Message = "Bir Hata oluştu";
                }
            }
            return(Json(aMsg));
        }
Пример #32
0
    public AjaxMessage[] GetNewMessages()
    {
        Member member = (Member)Session["Member"];
        AjaxMessage[] AjaxMessages = new AjaxMessage[0];

        if (member != null)
        {
            Message[] NewMessages = Message.GetNewMessages(member.MemberID);
            AjaxMessages = AjaxMessage.ConvertToAjaxMessage(member,NewMessages, true, GetMessageType.Inbox);
        }

        return AjaxMessages;
    }