Esempio n. 1
0
        public JsonResult LoadRecordData(string searchText, int _AD_Table_ID, int _Record_ID, int historyPageNo, int pageSize)
        {
            Ctx ctx = Session["ctx"] as Ctx;
            AttachmentHistoryModel model = new AttachmentHistoryModel();

            return(Json(JsonConvert.SerializeObject(model.LoadRecordData(ctx, searchText, _AD_Table_ID, _Record_ID, historyPageNo, pageSize)), JsonRequestBehavior.AllowGet));
        }
Esempio n. 2
0
        /// <summary>
        /// Dashboards the history.
        /// </summary>
        /// <param name="Email">The email.</param>
        /// <returns></returns>
        public List <AttachmentHistoryModel> DashboardHistory(string Email)
        {
            List <AttachmentHistoryModel> listHistory = new List <AttachmentHistoryModel>();

            using (SqlConnection con = new SqlConnection(ConnectionString))
            {
                SqlCommand cmd = new SqlCommand("DASHBOARD.PROC_ATTACHMENT_HISTORY", con);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@LOGGEDINUSEREMAIL", Email);
                con.Open();
                SqlDataReader rdr = cmd.ExecuteReader();
                while (rdr.Read())
                {
                    AttachmentHistoryModel history = new AttachmentHistoryModel();
                    history.AttachmentId           = Convert.ToInt64(rdr["ATTACHMENTID"].ToString());
                    history.AttachmentName         = rdr["NAME"].ToString();
                    history.AttachmentSize         = Convert.ToDecimal(rdr["SIZE"].ToString());
                    history.AttachmentType         = rdr["FILETYPE"].ToString();
                    history.AttachmentExpiriedOn   = Convert.ToDateTime(rdr["EXPIRIEDON"].ToString());
                    history.AttachmentCreationDate = Convert.ToDateTime(rdr["CREATIONDATE"].ToString());
                    history.AttachmentPurgedDate   = Convert.ToDateTime(rdr["PURGEDON"].ToString());
                    history.TotalDownload          = Convert.ToInt32(rdr["TOTALDOWNLOADS"].ToString());
                    history.Status = Convert.ToInt32(rdr["STATUS"].ToString());
                    listHistory.Add(history);
                }
                con.Close();
                return(listHistory);
            }
        }
Esempio n. 3
0
        // updated for call history comment by vinay
        public JsonResult SaveComment(int ID, string Text, bool isAppointment, bool isCall = false)
        {
            Ctx ct = Session["ctx"] as Ctx;
            AttachmentHistoryModel his = new AttachmentHistoryModel();

            return(Json(JsonConvert.SerializeObject(his.SaveComment(ID, Text, isAppointment, ct, isCall)), JsonRequestBehavior.AllowGet));
        }
Esempio n. 4
0
        public JsonResult LoadLetters(int ID)
        {
            Ctx ct = Session["ctx"] as Ctx;
            AttachmentHistoryModel model = new AttachmentHistoryModel();
            MailInfo hisIfno             = model.Letters(ID, ct);

            return(Json(JsonConvert.SerializeObject(hisIfno), JsonRequestBehavior.AllowGet));
        }
Esempio n. 5
0
        public JsonResult UserHistory(int C_BPartner_ID, int pageSize, int pageNo, Ctx ctx, string searchText)
        {
            Ctx ct = Session["ctx"] as Ctx;
            AttachmentHistoryModel    model   = new AttachmentHistoryModel();
            RealtedHistoryInfoDetails hisIfno = model.Userhistory(C_BPartner_ID, pageSize, pageNo, ct, searchText);

            return(Json(JsonConvert.SerializeObject(hisIfno), JsonRequestBehavior.AllowGet));
        }
Esempio n. 6
0
        public JsonResult RelatedHistory(int keyColumnID, int pageSize, int pageNo, string searchText, string keyColName)
        {
            Ctx ct = Session["ctx"] as Ctx;
            AttachmentHistoryModel    model   = new AttachmentHistoryModel();
            RealtedHistoryInfoDetails hisIfno = model.history(keyColumnID, pageSize, pageNo, ct, searchText, keyColName);

            return(Json(JsonConvert.SerializeObject(hisIfno), JsonRequestBehavior.AllowGet));
        }
Esempio n. 7
0
        // Load call details for history
        public JsonResult LoadCall(int ID)
        {
            Ctx ctx = Session["ctx"] as Ctx;
            AttachmentHistoryModel model = new AttachmentHistoryModel();
            CallInfo hisInfo             = model.Calls(ctx, ID);

            return(Json(JsonConvert.SerializeObject(hisInfo), JsonRequestBehavior.AllowGet));
        }
Esempio n. 8
0
        // Added by Bharat on 07 June 2017
        public JsonResult GetAppointmentData(string AppQry)
        {
            Ctx ct = Session["ctx"] as Ctx;
            AttachmentHistoryModel his = new AttachmentHistoryModel();

            AppQry = SecureEngineBridge.DecryptByClientKey(AppQry, ct.GetSecureKey());
            return(Json(JsonConvert.SerializeObject(his.GetAppointmentData(AppQry)), JsonRequestBehavior.AllowGet));
        }
Esempio n. 9
0
        // updated for call history chat by vinay
        public JsonResult ViewChatonLastHistory(int record_ID, bool isAppointment, bool isCall = false)
        {
            Ctx ct = Session["ctx"] as Ctx;
            AttachmentHistoryModel his   = new AttachmentHistoryModel();
            List <ChatInfos>       cInfo = his.ViewChatonLastHistory(ct, record_ID, isAppointment, isCall);

            return(Json(JsonConvert.SerializeObject(cInfo), JsonRequestBehavior.AllowGet));
        }