コード例 #1
0
        public void UpdateWFTaskForm(WorkflowTaskFormsDTO wfTaskFormDto)
        {
            SqlCommand cmd = new SqlCommand();

            //Specify that the SqlCommand is a stored procedure
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "EditWFTaskForm_Update";
            //Add the input parameters to the command object

            cmd.Parameters.Add("@Employee_TO", SqlDbType.UniqueIdentifier).Value = new Guid(wfTaskFormDto.Employee_TO);

            cmd.Parameters.Add("@workflowFormId", SqlDbType.UniqueIdentifier).Value = new Guid(wfTaskFormDto.wfFormId);

            Guid empCC = new Guid();

            if (!string.IsNullOrEmpty(wfTaskFormDto.Employee_CC))
            {
                empCC = new Guid(wfTaskFormDto.Employee_CC);
            }

            cmd.Parameters.Add("@Employee_CC", SqlDbType.UniqueIdentifier).Value = empCC;

            Guid empBCC = new Guid();

            if (!string.IsNullOrEmpty(wfTaskFormDto.Employee_BCC))
            {
                empBCC = new Guid(wfTaskFormDto.Employee_BCC);
            }

            cmd.Parameters.Add("@Employee_BCC", SqlDbType.UniqueIdentifier).Value = empBCC;
            cmd.Parameters.Add("@Subject", SqlDbType.VarChar).Value     = wfTaskFormDto.Subject;
            cmd.Parameters.Add("@Message_Box", SqlDbType.VarChar).Value = wfTaskFormDto.Message_Box;

            Guid escTo = new Guid();

            if (!string.IsNullOrEmpty(wfTaskFormDto.Escalate_To))
            {
                escTo = new Guid(wfTaskFormDto.Escalate_To);
            }

            cmd.Parameters.Add("@Escalate_To", SqlDbType.UniqueIdentifier).Value = escTo;
            cmd.Parameters.Add("@Escalate_After", SqlDbType.Int).Value           = wfTaskFormDto.Escalate_After == "" ? DBNull.Value : (Object)wfTaskFormDto.Escalate_After;


            SqlHelper sqlHelper = new SqlHelper();
            int       result    = sqlHelper.executeSave(cmd);

            if (result == -1)
            {
                throw new DuplicateNameException();
            }
        }
コード例 #2
0
        protected void btnSave_Click1(object sender, EventArgs e)
        {
            WorkflowsService workflowsService = new WorkflowsService();

            if (Request.QueryString["workflowFormId"] == null)
            {
                WorkflowTaskFormsDTO workflowTaskFormsDto = new WorkflowTaskFormsDTO(txtboxSubEmpID.Text.Trim(),
                                                                                     txtboxSubEmpName.Text.Trim(), txtboxFrom.Text.Trim(), HiddenTO.Value.ToString(), HiddenCC.Value.Trim(), HiddenBCC.Value.Trim(),
                                                                                     txtboxSubject.Text.Trim(), txtboxMessage.Text.Trim(), HiddenEscTO.Value.Trim(), txtboxEscalateAfter.Text,
                                                                                     txtboxCompleted.Text.Trim(), txtboxAdmin.Text.Trim(),
                                                                                     stepID, txtboxWFName.Text.Trim());

                workflowsService.SaveTaskForm(workflowTaskFormsDto);
                lblMessage.Text = "Your Form is being Saved!";
            }
            else
            {
                string wfFormId = Request.QueryString["workflowFormId"];
                WorkflowTaskFormsDTO workflowTaskFormsDto_Update = new WorkflowTaskFormsDTO(HiddenTO.Value.ToString(), HiddenCC.Value.Trim(), HiddenBCC.Value.Trim(),
                                                                                            txtboxSubject.Text.Trim(), txtboxMessage.Text.Trim(), HiddenEscTO.Value.Trim(), txtboxEscalateAfter.Text, wfFormId);

                workflowsService.UpdateTaskForm(workflowTaskFormsDto_Update);
            }
        }
コード例 #3
0
        public void SaveWFTaskForm(WorkflowTaskFormsDTO wfTaskFormDto)
        {
            SqlCommand cmd = new SqlCommand();

            //Specify that the SqlCommand is a stored procedure
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "EditWFTaskForm_Insert";
            //Add the input parameters to the command object

            cmd.Parameters.Add("@Subject_Employee_Id", SqlDbType.VarChar).Value   = wfTaskFormDto.Subject_Employee_Id;
            cmd.Parameters.Add("@Subject_Employee_Name", SqlDbType.VarChar).Value = wfTaskFormDto.Subject_Employee_Name;
            cmd.Parameters.Add("@From_Employee_Name", SqlDbType.VarChar).Value    = wfTaskFormDto.From_Employee_Name;
            cmd.Parameters.Add("@Employee_TO", SqlDbType.UniqueIdentifier).Value  = new Guid(wfTaskFormDto.Employee_TO);

            Guid empCC = new Guid();

            if (!string.IsNullOrEmpty(wfTaskFormDto.Employee_CC))
            {
                empCC = new Guid(wfTaskFormDto.Employee_CC);
            }

            cmd.Parameters.Add("@Employee_CC", SqlDbType.UniqueIdentifier).Value = empCC;

            Guid empBCC = new Guid();

            if (!string.IsNullOrEmpty(wfTaskFormDto.Employee_BCC))
            {
                empBCC = new Guid(wfTaskFormDto.Employee_BCC);
            }

            cmd.Parameters.Add("@Employee_BCC", SqlDbType.UniqueIdentifier).Value = empBCC;
            cmd.Parameters.Add("@Subject", SqlDbType.VarChar).Value     = wfTaskFormDto.Subject;
            cmd.Parameters.Add("@Message_Box", SqlDbType.VarChar).Value = wfTaskFormDto.Message_Box;

            Guid escTo = new Guid();

            if (!string.IsNullOrEmpty(wfTaskFormDto.Escalate_To))
            {
                escTo = new Guid(wfTaskFormDto.Escalate_To);
            }

            cmd.Parameters.Add("@Escalate_To", SqlDbType.UniqueIdentifier).Value = escTo;
            cmd.Parameters.Add("@Escalate_After", SqlDbType.Int).Value           = wfTaskFormDto.Escalate_After == "" ? DBNull.Value : (Object)wfTaskFormDto.Escalate_After;
            // cmd.Parameters.Add("@Escalate_Timestamp", SqlDbType.DateTime).Value = null;
            cmd.Parameters.Add("@Sign_Off", SqlDbType.VarChar).Value = wfTaskFormDto.Sign_Off;
            // cmd.Parameters.Add("@Sign_Timestamp", SqlDbType.DateTime).Value =null;
            cmd.Parameters.Add("@Cancel_By", SqlDbType.VarChar).Value = wfTaskFormDto.Cancel_By;
            // cmd.Parameters.Add("@Cancel_Timestamp", SqlDbType.DateTime).Value = null;
            cmd.Parameters.Add("@Step_Screen_Id", SqlDbType.UniqueIdentifier).Value = new Guid(wfTaskFormDto.Step_Screen_Id);
            cmd.Parameters.Add("@Workflow_Name", SqlDbType.VarChar).Value           = wfTaskFormDto.Workflow_Name;



            SqlHelper sqlHelper = new SqlHelper();
            int       result    = sqlHelper.executeSave(cmd);

            if (result == -1)
            {
                throw new DuplicateNameException();
            }
        }
コード例 #4
0
        public void UpdateTaskForm(WorkflowTaskFormsDTO wfTaskFormsDto)
        {
            WorkflowsDAO workflowsDAO = new WorkflowsDAO();

            workflowsDAO.UpdateWFTaskForm(wfTaskFormsDto);
        }
コード例 #5
0
        public void SaveTaskForm(WorkflowTaskFormsDTO wfTaskFormsDto)
        {
            WorkflowsDAO workflowsDAO = new WorkflowsDAO();

            workflowsDAO.SaveWFTaskForm(wfTaskFormsDto);
        }