public void btnChangeStatus_OnClick(object sender, EventArgs e)
        {
            int        enqId = int.Parse(GetQueryStringValue("enqid"));
            EnquiryDAL dal   = new EnquiryDAL();
            var        enq   = dal.GetEnquiryById(enqId);

            AddFollowUp(followUpControl, enq.Status, Utility.GetSelectedText(ddlEnquiryStatus));
            enq.Status = this.ddlEnquiryStatus.SelectedItem.Text;
            dal.Save();
            SetFocus(sender);
        }
Beispiel #2
0
        protected void btnUpload_Click(object sender, EventArgs e)
        {
            string serverFilePath = string.Empty;

            Utility.UploadFile(fileUploadEnqImg, "EnquiryImage", SourceNo, ref serverFilePath);
            ImagePath = serverFilePath;

            EnquiryDAL dal = new EnquiryDAL();
            var        enq = dal.GetEnquiryById(EnquiryId);

            enq.EnquiryImgPath = serverFilePath;
            dal.Save();
            BindControl();
        }
 protected void btnUpdateEnqNo_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(txtEnqNo.Text))
     {
         EnquiryDAL dal   = new EnquiryDAL();
         Enquiry    enq   = dal.GetEnquiryById(EnqId);
         var        dbEnq = dal.GetEnquiryByNo(txtEnqNo.Text);
         if (dbEnq != null && dbEnq.Enquiry_Id != EnqId)
         {
             ClientScript.RegisterClientScriptBlock(this.GetType(), "updateno", "<script>alert('已经有相同咨询单号!');</script>");
         }
         else
         {
             enq.Enquiry_No = txtEnqNo.Text;
             dal.Save();
         }
     }
 }