예제 #1
0
파일: LoanNotes.cs 프로젝트: PulseCRM/Pulse
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <LPWeb.Model.LoanNotes> DataTableToList(DataTable dt)
        {
            List <LPWeb.Model.LoanNotes> modelList = new List <LPWeb.Model.LoanNotes>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                LPWeb.Model.LoanNotes model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new LPWeb.Model.LoanNotes();
                    if (dt.Rows[n]["NoteId"].ToString() != "")
                    {
                        model.NoteId = int.Parse(dt.Rows[n]["NoteId"].ToString());
                    }
                    if (dt.Rows[n]["FileId"].ToString() != "")
                    {
                        model.FileId = int.Parse(dt.Rows[n]["FileId"].ToString());
                    }
                    if (dt.Rows[n]["Created"].ToString() != "")
                    {
                        model.Created = DateTime.Parse(dt.Rows[n]["Created"].ToString());
                    }
                    model.Sender = dt.Rows[n]["Sender"].ToString();
                    model.Note   = dt.Rows[n]["Note"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
예제 #2
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="iFileId"></param>
    /// <param name="sComments"></param>
    private void CreateLoanNotes(int iFileId, string sComments)
    {
        #region create LoanNotes

        LPWeb.Model.LoanNotes LoanNotesModel = new LPWeb.Model.LoanNotes();

        LoanNotesModel.FileId  = iFileId;
        LoanNotesModel.Created = DateTime.Now;
        LoanNotesModel.Sender  = this.CurrUser.sFirstName + " " + this.CurrUser.sLastName;
        LoanNotesModel.Note    = sComments;

        LoanNotes LoanNotesMgr = new LoanNotes();
        LoanNotesMgr.Add(LoanNotesModel);

        #endregion
    }
예제 #3
0
파일: LoanNotes.cs 프로젝트: PulseCRM/Pulse
 public void Update_LoanTaskId(LPWeb.Model.LoanNotes model)
 {
     dal.Update_LoanTaskId(model);
 }
예제 #4
0
파일: LoanNotes.cs 프로젝트: PulseCRM/Pulse
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(LPWeb.Model.LoanNotes model)
 {
     dal.Update(model);
 }
예제 #5
0
파일: LoanNotes.cs 프로젝트: PulseCRM/Pulse
 public int Add_LoanTaskId(LPWeb.Model.LoanNotes model)
 {
     return(dal.Add_LoanTaskId(model));
 }