示例#1
0
 private void map(ComplainInfo oParam, DataRow tempdr)
 {
     oParam.SysNo                   = Util.TrimIntNull(tempdr["SysNo"]);
     oParam.SoSysNo                 = Util.TrimIntNull(tempdr["SoSysNo"]);
     oParam.CustomerSysno           = Util.TrimIntNull(tempdr["CustomerSysno"]);
     oParam.Contact                 = Util.TrimNull(tempdr["Contact"]);
     oParam.ContactPhone            = Util.TrimNull(tempdr["ContactPhone"]);
     oParam.AreaSysNo               = Util.TrimIntNull(tempdr["AreaSysNo"]);
     oParam.Address                 = Util.TrimNull(tempdr["Address"]);
     oParam.CreateUserSysNo         = Util.TrimIntNull(tempdr["CreateUserSysNo"]);
     oParam.CreateTime              = Util.TrimDateNull(tempdr["CreateTime"]);
     oParam.Status                  = Util.TrimIntNull(tempdr["Status"]);
     oParam.LastUpdateUserSysNo     = Util.TrimIntNull(tempdr["LastUpdateUserSysNo"]);
     oParam.LastUpdateTime          = Util.TrimDateNull(tempdr["LastUpdateTime"]);
     oParam.CurrentHandleUserSysNo  = Util.TrimIntNull(tempdr["CurrentHandleUserSysNo"]);
     oParam.AbnormalType            = Util.TrimIntNull(tempdr["AbnormalType"]);
     oParam.AbnormalCauseType       = Util.TrimIntNull(tempdr["AbnormalCauseType"]);
     oParam.CustomerNote            = Util.TrimNull(tempdr["CustomerNote"]);
     oParam.EmployeeNote            = Util.TrimNull(tempdr["EmployeeNote"]);
     oParam.AuditNote               = Util.TrimNull(tempdr["AuditNote"]);
     oParam.AuditUserSysNo          = Util.TrimIntNull(tempdr["AuditUserSysNo"]);
     oParam.AuditTime               = Util.TrimDateNull(tempdr["AuditTime"]);
     oParam.Score                   = Util.TrimIntNull(tempdr["Score"]);
     oParam.ReviewBackNote          = Util.TrimNull(tempdr["ReviewBackNote"]);
     oParam.LastReviewBackUserSysNo = Util.TrimIntNull(tempdr["LastReviewBackUserSysNo"]);
     oParam.LastReviewTime          = Util.TrimDateNull(tempdr["LastReviewTime"]);
     oParam.CloseUserSysNo          = Util.TrimIntNull(tempdr["CloseUserSysNo"]);
     oParam.CloseTime               = Util.TrimDateNull(tempdr["CloseTime"]);
 }
示例#2
0
        private void submitButton_Click(object sender, EventArgs e)
        {
            ComplainInfo obj = new ComplainInfo()
            {
                cName = nameTextBox.Text,

                cRoll    = rollTextBox.Text,
                cMb      = mbTextbox.Text,
                cDate    = dateTextBox.Text,
                complain = complainRichTextBox.Text
            };

            if (cAllotIdTextBox.Text == "")
            {
                obj.cAllot_id = -1;
            }
            else
            {
                obj.cAllot_id = Convert.ToInt32(cAllotIdTextBox.Text);
            }

            ComplainChek ob = new ComplainChek();

            ob.submitChek(obj);

            ComplainDataAccess  dataAccess = new ComplainDataAccess();
            List <ComplainInfo> complains  = dataAccess.viewComplain();

            complainDataGridView.AutoGenerateColumns = false;
            complainDataGridView.DataSource          = complains;
        }
示例#3
0
        public void deleteComplain(ComplainInfo ob)
        {
            connection.Open();
            SqlDataAdapter sdaob = new SqlDataAdapter("delete  from tbl_complain where C_id=" + ob.cId + "", connection);

            sdaob.SelectCommand.ExecuteNonQuery();

            connection.Close();
        }
示例#4
0
        public void saveComplain(ComplainInfo obj)
        {
            connection.Open();
            SqlDataAdapter sda =
                new SqlDataAdapter(
                    "insert into tbl_complain(C_name,C_allot_id,C_roll,C_mobile,C_date,Complain) values('" +
                    obj.cName + "'," + obj.cAllot_id + ",'" + obj.cRoll + "','" + obj.cMb + "','" + obj.cDate +
                    "','" + obj.complain + "')", connection);

            sda.SelectCommand.ExecuteNonQuery();
            connection.Close();
            MessageBox.Show("save successfully");
        }
示例#5
0
        public ComplainInfo Load(int sysNo)
        {
            string  sql = "select * from Complain where sysno =" + sysNo;
            DataSet ds  = SqlHelper.ExecuteDataSet(sql);

            if (!Util.HasMoreRow(ds))
            {
                return(null);
            }

            ComplainInfo oComplain = new ComplainInfo();

            map(oComplain, ds.Tables[0].Rows[0]);
            return(oComplain);
        }
示例#6
0
        public List <ComplainInfo> viewComplain()
        {
            connection.Open();

            //part 2:command
            //string selectQuery = "select * from tbl_student inner join tbl_allot  on tbl_student.stu_id!=tbl_allot.student_id order by tbl_student.stu_CGPA desc";

            string selectQuery =
                "select * from tbl_complain ";
            SqlCommand command = new SqlCommand(selectQuery, connection);
            //part 3:execution

            SqlDataReader reader = command.ExecuteReader();

            List <ComplainInfo> complains = new List <ComplainInfo>();

            while (reader.Read())
            {
                object id     = reader[0];
                object a_id   = reader[1];
                object name   = reader[2];
                object roll   = reader[3];
                object mbNo   = reader[4];
                object date   = reader[5];
                object compla = reader[6];

                //Student stud = new Student();
                //stud.id = (int)id;
                //stud.name = name.ToString();
                //stud.department = department.ToString();

                ComplainInfo com = new ComplainInfo()
                {
                    cId       = (int)id,
                    cName     = name.ToString(),
                    cAllot_id = (int)a_id,
                    cRoll     = roll.ToString(),
                    cMb       = mbNo.ToString(),
                    cDate     = date.ToString(),
                    complain  = compla.ToString(),
                };
                complains.Add(com);
            }
            connection.Close();
            return(complains);
        }
示例#7
0
        public int nameRollChek(ComplainInfo obj)
        {
            //connection.Open();

            ////part 2:command
            ////string selectQuery = "select * from tbl_student inner join tbl_allot  on tbl_student.stu_id!=tbl_allot.student_id order by tbl_student.stu_CGPA desc";

            //string selectQuery =
            //    "select * from tbl_student inner join tbl_allot on tbl_student.stu_id=tbl_allot.student_id where stu_name='" + obj.cName + "'and stu_roll='"+obj.cRoll+"'";
            //SqlCommand command = new SqlCommand(selectQuery, connection);
            //int i = command.ExecuteNonQuery();
            //connection.Open();
            //SqlDataAdapter sdaObj1 = new SqlDataAdapter(" select * from tbl_allot inner join tbl_complain on tbl_allot.allot_id=tbl_complain.allot_id where C_allot_id='" + obj.cAllot_id + "'", connection);
            //DataTable dtObj1 = new DataTable();
            //sdaObj1.Fill(dtObj1);
            //int j = dtObj1.Rows.Count;

            //connection.Close();
            //return i;
            //if (j > 0)
            //{
            connection.Open();
            SqlDataAdapter sdaObj =
                new SqlDataAdapter(
                    " select * from tbl_student inner join tbl_allot on tbl_student.stu_id=tbl_allot.stu_id where allot_id='" + obj.cAllot_id + "'and(stu_name='" +
                    obj.cName + "'and stu_roll='" + obj.cRoll + "')", connection);
            DataTable dtObj = new DataTable();

            sdaObj.Fill(dtObj);
            int i = dtObj.Rows.Count;

            connection.Close();
            return(i);
            //}
            //else
            //{
            //    return j;
            //}
        }
        public void submitChek(ComplainInfo obj)
        {
            if (obj.cName == "" || obj.cAllot_id == -1 || obj.cRoll == "" || obj.cMb == "" || obj.cDate == "" || obj.complain == "")
            {
                MessageBox.Show("please fill up all the require information!!!");
            }

            else
            {
                ComplainDataAccess dataAccess = new ComplainDataAccess();
                int i = dataAccess.nameRollChek(obj);
                if (i > 0)
                {
                    dataAccess.saveComplain(obj);
                }

                else
                {
                    MessageBox.Show("your allot id or name or roll don't match  !!!!!");
                }
            }
        }
        public void deleteComplainCheck(ComplainInfo ob)
        {
            if (ob.cId == 0)
            {
                MessageBox.Show("plese click on a row .");
            }

            else
            {
                DialogResult dr = MessageBox.Show("Are you want to delete complain ID :" + ob.cId, "continue", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (dr == DialogResult.Yes)
                {
                    ComplainDataAccess dObj = new ComplainDataAccess();

                    dObj.deleteComplain(ob);
                    MessageBox.Show("deleted ");
                }
                else if (dr == DialogResult.No)
                {
                    MessageBox.Show("not deleted.");
                }
            }
        }
示例#10
0
        private void deleteButton_Click(object sender, EventArgs e)
        {
            ComplainInfo ob = new ComplainInfo();

            if (deleteComplainIdTextBox.Text == "")
            {
                ob.cId = 0;
            }

            else
            {
                ob.cId = Convert.ToInt32(deleteComplainIdTextBox.Text);
            }

            ComplainChek obj = new ComplainChek();

            obj.deleteComplainCheck(ob);

            ComplainDataAccess  dataAccess = new ComplainDataAccess();
            List <ComplainInfo> complains  = dataAccess.viewComplain();

            complainDataGridView.AutoGenerateColumns = false;
            complainDataGridView.DataSource          = complains;
        }
示例#11
0
        public int Update(ComplainInfo oParam)
        {
            string     sql = @"UPDATE Complain SET 
                            SoSysNo=@SoSysNo, CustomerSysno=@CustomerSysno, 
                            Contact=@Contact, ContactPhone=@ContactPhone, 
                            AreaSysNo=@AreaSysNo, Address=@Address, 
                            CreateUserSysNo=@CreateUserSysNo, CreateTime=@CreateTime, 
                            Status=@Status, LastUpdateUserSysNo=@LastUpdateUserSysNo, 
                            LastUpdateTime=@LastUpdateTime, CurrentHandleUserSysNo=@CurrentHandleUserSysNo, 
                            AbnormalType=@AbnormalType, AbnormalCauseType=@AbnormalCauseType, 
                            CustomerNote=@CustomerNote, EmployeeNote=@EmployeeNote, 
                            AuditNote=@AuditNote, AuditUserSysNo=@AuditUserSysNo, 
                            AuditTime=@AuditTime, Score=@Score, 
                            ReviewBackNote=@ReviewBackNote, LastReviewBackUserSysNo=@LastReviewBackUserSysNo, 
                            LastReviewTime=@LastReviewTime, CloseUserSysNo=@CloseUserSysNo, 
                            CloseTime=@CloseTime
                            WHERE SysNo=@SysNo";
            SqlCommand cmd = new SqlCommand(sql);

            SqlParameter paramSysNo                   = new SqlParameter("@SysNo", SqlDbType.Int, 4);
            SqlParameter paramSoSysNo                 = new SqlParameter("@SoSysNo", SqlDbType.Int, 4);
            SqlParameter paramCustomerSysno           = new SqlParameter("@CustomerSysno", SqlDbType.Int, 4);
            SqlParameter paramContact                 = new SqlParameter("@Contact", SqlDbType.NVarChar, 50);
            SqlParameter paramContactPhone            = new SqlParameter("@ContactPhone", SqlDbType.NVarChar, 50);
            SqlParameter paramAreaSysNo               = new SqlParameter("@AreaSysNo", SqlDbType.Int, 4);
            SqlParameter paramAddress                 = new SqlParameter("@Address", SqlDbType.NVarChar, 200);
            SqlParameter paramCreateUserSysNo         = new SqlParameter("@CreateUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramCreateTime              = new SqlParameter("@CreateTime", SqlDbType.DateTime);
            SqlParameter paramStatus                  = new SqlParameter("@Status", SqlDbType.Int, 4);
            SqlParameter paramLastUpdateUserSysNo     = new SqlParameter("@LastUpdateUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramLastUpdateTime          = new SqlParameter("@LastUpdateTime", SqlDbType.DateTime);
            SqlParameter paramCurrentHandleUserSysNo  = new SqlParameter("@CurrentHandleUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramAbnormalType            = new SqlParameter("@AbnormalType", SqlDbType.Int, 4);
            SqlParameter paramAbnormalCauseType       = new SqlParameter("@AbnormalCauseType", SqlDbType.Int, 4);
            SqlParameter paramCustomerNote            = new SqlParameter("@CustomerNote", SqlDbType.Text, 0);
            SqlParameter paramEmployeeNote            = new SqlParameter("@EmployeeNote", SqlDbType.Text, 0);
            SqlParameter paramAuditNote               = new SqlParameter("@AuditNote", SqlDbType.Text, 0);
            SqlParameter paramAuditUserSysNo          = new SqlParameter("@AuditUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramAuditTime               = new SqlParameter("@AuditTime", SqlDbType.DateTime);
            SqlParameter paramScore                   = new SqlParameter("@Score", SqlDbType.Int, 4);
            SqlParameter paramReviewBackNote          = new SqlParameter("@ReviewBackNote", SqlDbType.Text, 0);
            SqlParameter paramLastReviewBackUserSysNo = new SqlParameter("@LastReviewBackUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramLastReviewTime          = new SqlParameter("@LastReviewTime", SqlDbType.DateTime);
            SqlParameter paramCloseUserSysNo          = new SqlParameter("@CloseUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramCloseTime               = new SqlParameter("@CloseTime", SqlDbType.DateTime);

            if (oParam.SysNo != AppConst.IntNull)
            {
                paramSysNo.Value = oParam.SysNo;
            }
            else
            {
                paramSysNo.Value = System.DBNull.Value;
            }
            if (oParam.SoSysNo != AppConst.IntNull)
            {
                paramSoSysNo.Value = oParam.SoSysNo;
            }
            else
            {
                paramSoSysNo.Value = System.DBNull.Value;
            }
            if (oParam.CustomerSysno != AppConst.IntNull)
            {
                paramCustomerSysno.Value = oParam.CustomerSysno;
            }
            else
            {
                paramCustomerSysno.Value = System.DBNull.Value;
            }
            if (oParam.Contact != AppConst.StringNull)
            {
                paramContact.Value = oParam.Contact;
            }
            else
            {
                paramContact.Value = System.DBNull.Value;
            }
            if (oParam.ContactPhone != AppConst.StringNull)
            {
                paramContactPhone.Value = oParam.ContactPhone;
            }
            else
            {
                paramContactPhone.Value = System.DBNull.Value;
            }
            if (oParam.AreaSysNo != AppConst.IntNull)
            {
                paramAreaSysNo.Value = oParam.AreaSysNo;
            }
            else
            {
                paramAreaSysNo.Value = System.DBNull.Value;
            }
            if (oParam.Address != AppConst.StringNull)
            {
                paramAddress.Value = oParam.Address;
            }
            else
            {
                paramAddress.Value = System.DBNull.Value;
            }
            if (oParam.CreateUserSysNo != AppConst.IntNull)
            {
                paramCreateUserSysNo.Value = oParam.CreateUserSysNo;
            }
            else
            {
                paramCreateUserSysNo.Value = System.DBNull.Value;
            }
            if (oParam.CreateTime != AppConst.DateTimeNull)
            {
                paramCreateTime.Value = oParam.CreateTime;
            }
            else
            {
                paramCreateTime.Value = System.DBNull.Value;
            }
            if (oParam.Status != AppConst.IntNull)
            {
                paramStatus.Value = oParam.Status;
            }
            else
            {
                paramStatus.Value = System.DBNull.Value;
            }
            if (oParam.LastUpdateUserSysNo != AppConst.IntNull)
            {
                paramLastUpdateUserSysNo.Value = oParam.LastUpdateUserSysNo;
            }
            else
            {
                paramLastUpdateUserSysNo.Value = System.DBNull.Value;
            }
            if (oParam.LastUpdateTime != AppConst.DateTimeNull)
            {
                paramLastUpdateTime.Value = oParam.LastUpdateTime;
            }
            else
            {
                paramLastUpdateTime.Value = System.DBNull.Value;
            }
            if (oParam.CurrentHandleUserSysNo != AppConst.IntNull)
            {
                paramCurrentHandleUserSysNo.Value = oParam.CurrentHandleUserSysNo;
            }
            else
            {
                paramCurrentHandleUserSysNo.Value = System.DBNull.Value;
            }
            if (oParam.AbnormalType != AppConst.IntNull)
            {
                paramAbnormalType.Value = oParam.AbnormalType;
            }
            else
            {
                paramAbnormalType.Value = System.DBNull.Value;
            }
            if (oParam.AbnormalCauseType != AppConst.IntNull)
            {
                paramAbnormalCauseType.Value = oParam.AbnormalCauseType;
            }
            else
            {
                paramAbnormalCauseType.Value = System.DBNull.Value;
            }
            if (oParam.CustomerNote != AppConst.StringNull)
            {
                paramCustomerNote.Value = oParam.CustomerNote;
            }
            else
            {
                paramCustomerNote.Value = System.DBNull.Value;
            }
            if (oParam.EmployeeNote != AppConst.StringNull)
            {
                paramEmployeeNote.Value = oParam.EmployeeNote;
            }
            else
            {
                paramEmployeeNote.Value = System.DBNull.Value;
            }
            if (oParam.AuditNote != AppConst.StringNull)
            {
                paramAuditNote.Value = oParam.AuditNote;
            }
            else
            {
                paramAuditNote.Value = System.DBNull.Value;
            }
            if (oParam.AuditUserSysNo != AppConst.IntNull)
            {
                paramAuditUserSysNo.Value = oParam.AuditUserSysNo;
            }
            else
            {
                paramAuditUserSysNo.Value = System.DBNull.Value;
            }
            if (oParam.AuditTime != AppConst.DateTimeNull)
            {
                paramAuditTime.Value = oParam.AuditTime;
            }
            else
            {
                paramAuditTime.Value = System.DBNull.Value;
            }
            if (oParam.Score != AppConst.IntNull)
            {
                paramScore.Value = oParam.Score;
            }
            else
            {
                paramScore.Value = System.DBNull.Value;
            }
            if (oParam.ReviewBackNote != AppConst.StringNull)
            {
                paramReviewBackNote.Value = oParam.ReviewBackNote;
            }
            else
            {
                paramReviewBackNote.Value = System.DBNull.Value;
            }
            if (oParam.LastReviewBackUserSysNo != AppConst.IntNull)
            {
                paramLastReviewBackUserSysNo.Value = oParam.LastReviewBackUserSysNo;
            }
            else
            {
                paramLastReviewBackUserSysNo.Value = System.DBNull.Value;
            }
            if (oParam.LastReviewTime != AppConst.DateTimeNull)
            {
                paramLastReviewTime.Value = oParam.LastReviewTime;
            }
            else
            {
                paramLastReviewTime.Value = System.DBNull.Value;
            }
            if (oParam.CloseUserSysNo != AppConst.IntNull)
            {
                paramCloseUserSysNo.Value = oParam.CloseUserSysNo;
            }
            else
            {
                paramCloseUserSysNo.Value = System.DBNull.Value;
            }
            if (oParam.CloseTime != AppConst.DateTimeNull)
            {
                paramCloseTime.Value = oParam.CloseTime;
            }
            else
            {
                paramCloseTime.Value = System.DBNull.Value;
            }

            cmd.Parameters.Add(paramSysNo);
            cmd.Parameters.Add(paramSoSysNo);
            cmd.Parameters.Add(paramCustomerSysno);
            cmd.Parameters.Add(paramContact);
            cmd.Parameters.Add(paramContactPhone);
            cmd.Parameters.Add(paramAreaSysNo);
            cmd.Parameters.Add(paramAddress);
            cmd.Parameters.Add(paramCreateUserSysNo);
            cmd.Parameters.Add(paramCreateTime);
            cmd.Parameters.Add(paramStatus);
            cmd.Parameters.Add(paramLastUpdateUserSysNo);
            cmd.Parameters.Add(paramLastUpdateTime);
            cmd.Parameters.Add(paramCurrentHandleUserSysNo);
            cmd.Parameters.Add(paramAbnormalType);
            cmd.Parameters.Add(paramAbnormalCauseType);
            cmd.Parameters.Add(paramCustomerNote);
            cmd.Parameters.Add(paramEmployeeNote);
            cmd.Parameters.Add(paramAuditNote);
            cmd.Parameters.Add(paramAuditUserSysNo);
            cmd.Parameters.Add(paramAuditTime);
            cmd.Parameters.Add(paramScore);
            cmd.Parameters.Add(paramReviewBackNote);
            cmd.Parameters.Add(paramLastReviewBackUserSysNo);
            cmd.Parameters.Add(paramLastReviewTime);
            cmd.Parameters.Add(paramCloseUserSysNo);
            cmd.Parameters.Add(paramCloseTime);

            return(SqlHelper.ExecuteNonQuery(cmd));
        }
示例#12
0
        public int Insert(ComplainInfo oParam)
        {
            string     sql = @"INSERT INTO Complain
                            (
                            SoSysNo, CustomerSysno, Contact, ContactPhone, 
                            AreaSysNo, Address, CreateUserSysNo, CreateTime, 
                            Status, LastUpdateUserSysNo, LastUpdateTime, CurrentHandleUserSysNo, 
                            AbnormalType, AbnormalCauseType, CustomerNote, EmployeeNote, 
                            AuditNote, AuditUserSysNo, AuditTime, Score, 
                            ReviewBackNote, LastReviewBackUserSysNo, LastReviewTime, CloseUserSysNo, 
                            CloseTime
                            )
                            VALUES (
                            @SoSysNo, @CustomerSysno, @Contact, @ContactPhone, 
                            @AreaSysNo, @Address, @CreateUserSysNo, @CreateTime, 
                            @Status, @LastUpdateUserSysNo, @LastUpdateTime, @CurrentHandleUserSysNo, 
                            @AbnormalType, @AbnormalCauseType, @CustomerNote, @EmployeeNote, 
                            @AuditNote, @AuditUserSysNo, @AuditTime, @Score, 
                            @ReviewBackNote, @LastReviewBackUserSysNo, @LastReviewTime, @CloseUserSysNo, 
                            @CloseTime
                            );set @SysNo = SCOPE_IDENTITY();";
            SqlCommand cmd = new SqlCommand(sql);

            SqlParameter paramSysNo                   = new SqlParameter("@SysNo", SqlDbType.Int, 4);
            SqlParameter paramSoSysNo                 = new SqlParameter("@SoSysNo", SqlDbType.Int, 4);
            SqlParameter paramCustomerSysno           = new SqlParameter("@CustomerSysno", SqlDbType.Int, 4);
            SqlParameter paramContact                 = new SqlParameter("@Contact", SqlDbType.NVarChar, 50);
            SqlParameter paramContactPhone            = new SqlParameter("@ContactPhone", SqlDbType.NVarChar, 50);
            SqlParameter paramAreaSysNo               = new SqlParameter("@AreaSysNo", SqlDbType.Int, 4);
            SqlParameter paramAddress                 = new SqlParameter("@Address", SqlDbType.NVarChar, 200);
            SqlParameter paramCreateUserSysNo         = new SqlParameter("@CreateUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramCreateTime              = new SqlParameter("@CreateTime", SqlDbType.DateTime);
            SqlParameter paramStatus                  = new SqlParameter("@Status", SqlDbType.Int, 4);
            SqlParameter paramLastUpdateUserSysNo     = new SqlParameter("@LastUpdateUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramLastUpdateTime          = new SqlParameter("@LastUpdateTime", SqlDbType.DateTime);
            SqlParameter paramCurrentHandleUserSysNo  = new SqlParameter("@CurrentHandleUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramAbnormalType            = new SqlParameter("@AbnormalType", SqlDbType.Int, 4);
            SqlParameter paramAbnormalCauseType       = new SqlParameter("@AbnormalCauseType", SqlDbType.Int, 4);
            SqlParameter paramCustomerNote            = new SqlParameter("@CustomerNote", SqlDbType.Text, 0);
            SqlParameter paramEmployeeNote            = new SqlParameter("@EmployeeNote", SqlDbType.Text, 0);
            SqlParameter paramAuditNote               = new SqlParameter("@AuditNote", SqlDbType.NVarChar, 200);
            SqlParameter paramAuditUserSysNo          = new SqlParameter("@AuditUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramAuditTime               = new SqlParameter("@AuditTime", SqlDbType.DateTime);
            SqlParameter paramScore                   = new SqlParameter("@Score", SqlDbType.Int, 4);
            SqlParameter paramReviewBackNote          = new SqlParameter("@ReviewBackNote", SqlDbType.Text, 0);
            SqlParameter paramLastReviewBackUserSysNo = new SqlParameter("@LastReviewBackUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramLastReviewTime          = new SqlParameter("@LastReviewTime", SqlDbType.DateTime);
            SqlParameter paramCloseUserSysNo          = new SqlParameter("@CloseUserSysNo", SqlDbType.Int, 4);
            SqlParameter paramCloseTime               = new SqlParameter("@CloseTime", SqlDbType.DateTime);

            paramSysNo.Direction = ParameterDirection.Output;
            if (oParam.SoSysNo != AppConst.IntNull)
            {
                paramSoSysNo.Value = oParam.SoSysNo;
            }
            else
            {
                paramSoSysNo.Value = System.DBNull.Value;
            }
            if (oParam.CustomerSysno != AppConst.IntNull)
            {
                paramCustomerSysno.Value = oParam.CustomerSysno;
            }
            else
            {
                paramCustomerSysno.Value = System.DBNull.Value;
            }
            if (oParam.Contact != AppConst.StringNull)
            {
                paramContact.Value = oParam.Contact;
            }
            else
            {
                paramContact.Value = System.DBNull.Value;
            }
            if (oParam.ContactPhone != AppConst.StringNull)
            {
                paramContactPhone.Value = oParam.ContactPhone;
            }
            else
            {
                paramContactPhone.Value = System.DBNull.Value;
            }
            if (oParam.AreaSysNo != AppConst.IntNull)
            {
                paramAreaSysNo.Value = oParam.AreaSysNo;
            }
            else
            {
                paramAreaSysNo.Value = System.DBNull.Value;
            }
            if (oParam.Address != AppConst.StringNull)
            {
                paramAddress.Value = oParam.Address;
            }
            else
            {
                paramAddress.Value = System.DBNull.Value;
            }
            if (oParam.CreateUserSysNo != AppConst.IntNull)
            {
                paramCreateUserSysNo.Value = oParam.CreateUserSysNo;
            }
            else
            {
                paramCreateUserSysNo.Value = System.DBNull.Value;
            }
            if (oParam.CreateTime != AppConst.DateTimeNull)
            {
                paramCreateTime.Value = oParam.CreateTime;
            }
            else
            {
                paramCreateTime.Value = System.DBNull.Value;
            }
            if (oParam.Status != AppConst.IntNull)
            {
                paramStatus.Value = oParam.Status;
            }
            else
            {
                paramStatus.Value = System.DBNull.Value;
            }
            if (oParam.LastUpdateUserSysNo != AppConst.IntNull)
            {
                paramLastUpdateUserSysNo.Value = oParam.LastUpdateUserSysNo;
            }
            else
            {
                paramLastUpdateUserSysNo.Value = System.DBNull.Value;
            }
            if (oParam.LastUpdateTime != AppConst.DateTimeNull)
            {
                paramLastUpdateTime.Value = oParam.LastUpdateTime;
            }
            else
            {
                paramLastUpdateTime.Value = System.DBNull.Value;
            }
            if (oParam.CurrentHandleUserSysNo != AppConst.IntNull)
            {
                paramCurrentHandleUserSysNo.Value = oParam.CurrentHandleUserSysNo;
            }
            else
            {
                paramCurrentHandleUserSysNo.Value = System.DBNull.Value;
            }
            if (oParam.AbnormalType != AppConst.IntNull)
            {
                paramAbnormalType.Value = oParam.AbnormalType;
            }
            else
            {
                paramAbnormalType.Value = System.DBNull.Value;
            }
            if (oParam.AbnormalCauseType != AppConst.IntNull)
            {
                paramAbnormalCauseType.Value = oParam.AbnormalCauseType;
            }
            else
            {
                paramAbnormalCauseType.Value = System.DBNull.Value;
            }
            if (oParam.CustomerNote != AppConst.StringNull)
            {
                paramCustomerNote.Value = oParam.CustomerNote;
            }
            else
            {
                paramCustomerNote.Value = System.DBNull.Value;
            }
            if (oParam.EmployeeNote != AppConst.StringNull)
            {
                paramEmployeeNote.Value = oParam.EmployeeNote;
            }
            else
            {
                paramEmployeeNote.Value = System.DBNull.Value;
            }
            if (oParam.AuditNote != AppConst.StringNull)
            {
                paramAuditNote.Value = oParam.AuditNote;
            }
            else
            {
                paramAuditNote.Value = System.DBNull.Value;
            }
            if (oParam.AuditUserSysNo != AppConst.IntNull)
            {
                paramAuditUserSysNo.Value = oParam.AuditUserSysNo;
            }
            else
            {
                paramAuditUserSysNo.Value = System.DBNull.Value;
            }
            if (oParam.AuditTime != AppConst.DateTimeNull)
            {
                paramAuditTime.Value = oParam.AuditTime;
            }
            else
            {
                paramAuditTime.Value = System.DBNull.Value;
            }
            if (oParam.Score != AppConst.IntNull)
            {
                paramScore.Value = oParam.Score;
            }
            else
            {
                paramScore.Value = System.DBNull.Value;
            }
            if (oParam.ReviewBackNote != AppConst.StringNull)
            {
                paramReviewBackNote.Value = oParam.ReviewBackNote;
            }
            else
            {
                paramReviewBackNote.Value = System.DBNull.Value;
            }
            if (oParam.LastReviewBackUserSysNo != AppConst.IntNull)
            {
                paramLastReviewBackUserSysNo.Value = oParam.LastReviewBackUserSysNo;
            }
            else
            {
                paramLastReviewBackUserSysNo.Value = System.DBNull.Value;
            }
            if (oParam.LastReviewTime != AppConst.DateTimeNull)
            {
                paramLastReviewTime.Value = oParam.LastReviewTime;
            }
            else
            {
                paramLastReviewTime.Value = System.DBNull.Value;
            }
            if (oParam.CloseUserSysNo != AppConst.IntNull)
            {
                paramCloseUserSysNo.Value = oParam.CloseUserSysNo;
            }
            else
            {
                paramCloseUserSysNo.Value = System.DBNull.Value;
            }
            if (oParam.CloseTime != AppConst.DateTimeNull)
            {
                paramCloseTime.Value = oParam.CloseTime;
            }
            else
            {
                paramCloseTime.Value = System.DBNull.Value;
            }

            cmd.Parameters.Add(paramSysNo);
            cmd.Parameters.Add(paramSoSysNo);
            cmd.Parameters.Add(paramCustomerSysno);
            cmd.Parameters.Add(paramContact);
            cmd.Parameters.Add(paramContactPhone);
            cmd.Parameters.Add(paramAreaSysNo);
            cmd.Parameters.Add(paramAddress);
            cmd.Parameters.Add(paramCreateUserSysNo);
            cmd.Parameters.Add(paramCreateTime);
            cmd.Parameters.Add(paramStatus);
            cmd.Parameters.Add(paramLastUpdateUserSysNo);
            cmd.Parameters.Add(paramLastUpdateTime);
            cmd.Parameters.Add(paramCurrentHandleUserSysNo);
            cmd.Parameters.Add(paramAbnormalType);
            cmd.Parameters.Add(paramAbnormalCauseType);
            cmd.Parameters.Add(paramCustomerNote);
            cmd.Parameters.Add(paramEmployeeNote);
            cmd.Parameters.Add(paramAuditNote);
            cmd.Parameters.Add(paramAuditUserSysNo);
            cmd.Parameters.Add(paramAuditTime);
            cmd.Parameters.Add(paramScore);
            cmd.Parameters.Add(paramReviewBackNote);
            cmd.Parameters.Add(paramLastReviewBackUserSysNo);
            cmd.Parameters.Add(paramLastReviewTime);
            cmd.Parameters.Add(paramCloseUserSysNo);
            cmd.Parameters.Add(paramCloseTime);

            return(SqlHelper.ExecuteNonQuery(cmd, out oParam.SysNo));
        }
示例#13
0
 public void Update(ComplainInfo oParam)
 {
     new ComplainDac().Update(oParam);
 }
示例#14
0
 public void Insert(ComplainInfo oParam)
 {
     new ComplainDac().Insert(oParam);
 }