예제 #1
0
        public int InsertCaseFollowUp(CaseFollowUp objCaseFollowUp)
        {
            objCaseFollowUp.CaseFollowUpID = 1;
            BeginTransaction();

            try
            {
                objCaseFollowUp.CaseFollowUpID = Insert(objCaseFollowUp);
                CommitTransaction();
            }
            catch (Exception ex)
            {
                RollBackTransaction();
                objCaseFollowUp.CaseFollowUpID = -1;
            }

            return objCaseFollowUp.CaseFollowUpID;
        }
예제 #2
0
        public int UpdateCaseFollowUp(CaseFollowUp objCaseFollowUp)
        {
            int rowsaffected = -1;
            BeginTransaction();
            try
            {
                String[] UpdateProperties = new String[] { "FollowUpDate", "CaseID", "Description"
                                                            , "UpdatedBy", "UpdatedDate"
                                                            };
                rowsaffected = Update(objCaseFollowUp, UpdateProperties);

                CommitTransaction();
            }
            catch (Exception e)
            {
                RollBackTransaction();
                rowsaffected = -1;
            }
            return rowsaffected;

        }
예제 #3
0
        public static CaseFollowUp GetCaseFollowUp(int CaseFollowUpID)
        {
            CaseFollowUp objCaseFollowUp = new CaseFollowUp();
            return (CaseFollowUp)(new CaseFollowUpDAO().FillDTO(objCaseFollowUp, "CaseFollowUpID=" + CaseFollowUpID));

        }
예제 #4
0
 public static int UpdateCaseFollowUp(CaseFollowUp objCaseFollowUp)
 {
     return new CaseFollowUpDAO().UpdateCaseFollowUp(objCaseFollowUp);
 }
예제 #5
0
 public static int InsertCaseFollowUp(CaseFollowUp objCaseFollowUp)
 {
     return new CaseFollowUpDAO().InsertCaseFollowUp(objCaseFollowUp);
 }
예제 #6
0
        protected void btnAddCaseFollowUp_Click(object sender, EventArgs e)
        {
            CaseFollowUp objCaseFollowUp = new CaseFollowUp();
            objCaseFollowUp.SaMIProfileID = 0;
            objCaseFollowUp.CaseID = Convert.ToInt32(ddlFollowupCaseType.SelectedValue);
            objCaseFollowUp.Description = txtCaseFollowUpDesc.Text.Trim();
            objCaseFollowUp.FollowUpDate = Convert.ToDateTime(txtCaseFollowUpDate.Text);

            if (!string.IsNullOrEmpty(hfCaseFollowUpID.Value))
            {
                objCaseFollowUp.UpdatedBy = UserAuthentication.GetUserId(this.Page);
                objCaseFollowUp.UpdatedDate = DateTime.Now;
                objCaseFollowUp.CaseFollowUpID = Convert.ToInt32(hfCaseFollowUpID.Value);
                CaseFollowUpBO.UpdateCaseFollowUp(objCaseFollowUp);
            }
            else
            {
                objCaseFollowUp.CreatedBy = UserAuthentication.GetUserId(this.Page);
                objCaseFollowUp.CreatedDate = DateTime.Now;
                CaseFollowUpBO.InsertCaseFollowUp(objCaseFollowUp);
            }
            ClearCaseFollowUp();
            LoadCasesAndFollowUp(Convert.ToInt32(hfCaseProfileID.Value));
        }