Пример #1
0
    public string[] setStudentBaseData(CreateStudent StudentData)
    {
        string[] returnValue = new string[2];
        returnValue[0] = "0";
        returnValue[1] = "";
        DataBase Base = new DataBase();
        int CaseStatu = this.CaseStatusFunction(StudentData);
        string upPhoto = "";
        if (StudentData.studentPhoto != null)
        {
            upPhoto += " StudentAvatar=@StudentAvatar, ";
        }
        if (StudentData.studentManualImg != null)
        {
            upPhoto += " DisabilityProve=@DisabilityProve, ";
        }
        StudentData1 oldStudentDataBase1=this.getStudentData1(StudentData.ID);
        StudentHearingInformation oldStudentDataBase5 = this.getStudentHearingInfo(StudentData.ID);
        #region 離會生&轉通知
        if (oldStudentDataBase1.endReasonDate == "1900-01-01" && oldStudentDataBase1.endReasonDate != Chk.CheckStringFunction(StudentData.endReasonDate) && Chk.CheckStringFunction(StudentData.endReasonDate).Length > 0)
        {
            /*已結案轉入離會生*/
            CreateStudentTracked StudentTracked = new CreateStudentTracked();

            StudentTracked.sUnit = StudentData.Unit;
            StudentTracked.studentID = StudentData.studentID;
            StudentTracked.StudentIdentity = StudentData.studentTWID;
            StudentTracked.email = StudentData.email;
            StudentTracked.addressZip = StudentData.addressZip;
            StudentTracked.addressCity = StudentData.addressCity;
            StudentTracked.address = StudentData.address;
            StudentTracked.Tel = StudentData.fPHPhone2;
            StudentTracked.manualCategory1 = StudentData.manualCategory1;
            StudentTracked.manualGrade1 = StudentData.manualGrade1;
            StudentTracked.manualCategory2 = StudentData.manualCategory2;
            StudentTracked.manualGrade2 = StudentData.manualGrade2;
            StudentTracked.manualCategory3 = StudentData.manualCategory3;
            StudentTracked.manualGrade3 = StudentData.manualGrade3;
            StudentTracked.assistmanageR = oldStudentDataBase5.assistmanageR;
            StudentTracked.brandR = oldStudentDataBase5.brandR;
            StudentTracked.modelR = oldStudentDataBase5.modelR;
            StudentTracked.buyingtimeR = oldStudentDataBase5.buyingtimeR;
            StudentTracked.buyingPlaceR = oldStudentDataBase5.buyingPlaceR;
            StudentTracked.insertHospitalR = oldStudentDataBase5.insertHospitalR;
            StudentTracked.openHzDateR = oldStudentDataBase5.openHzDateR;
            StudentTracked.assistmanageL = oldStudentDataBase5.assistmanageL;
            StudentTracked.brandL = oldStudentDataBase5.brandL;
            StudentTracked.modelL = oldStudentDataBase5.modelL;
            StudentTracked.buyingtimeL = oldStudentDataBase5.buyingtimeL;
            StudentTracked.buyingPlaceL = oldStudentDataBase5.buyingPlaceL;
            StudentTracked.insertHospitalL = oldStudentDataBase5.insertHospitalL;
            StudentTracked.openHzDateL = oldStudentDataBase5.openHzDateL;
            this.createStudentTrackedDataBase(StudentTracked);
            OtherDataBase oDB = new OtherDataBase();
            StaffDataBase sDB = new StaffDataBase();
            List<int> item = new List<int>();
            //</option><option value="20">主任/教師</option><option value="21">主任/聽力師</option><option value="22">主任/社工</option></select>
            item.Add(11);//主任
            item.Add(20);//主任/教師
            item.Add(21);//主任/聽力師
            item.Add(22);//主任/社工

            item.Add(17);//社工管理長
            item.Add(18);//社工
            int[] days = { 90, 180, 365 };
            List<StaffDataList> SDL = sDB.getAllStaffDataList(item);
            foreach (StaffDataList atom in SDL)
            {
                if (atom.sUnit == StudentData.Unit)
                {
                    for (int i = 0; i < 3; i++)
                    {
                        CreateRemind Remind = new CreateRemind();
                        Remind.executionDate = Chk.CheckStringtoDateFunction(StudentData.endReasonDate).AddDays(days[i] - 5).ToShortDateString();
                        Remind.recipientID = atom.sID;
                        Remind.executionContent = StudentData.studentName + " 離會第 " + days[i].ToString() + " 天追蹤個案近況";
                        //cmd.Parameters.Add("@Executor", SqlDbType.Int).Value = Chk.CheckStringtoIntFunction(RemindSystemData.recipientID);
                        //cmd.Parameters.Add("@RemindContent", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(RemindSystemData.executionContent);
                        //cmd.Parameters.Add("@RemindDate", SqlDbType.Date).Value = Chk.CheckStringtoDateFunction(RemindSystemData.executionDate);
                        //cmd.Parameters.Add("@CompleteDate", SqlDbType.Date).Value = Chk.CheckStringtoDateFunction(RemindSystemData.fulfillmentDate);
                        oDB.CreateRemindSystem(Remind);
                    }
                }
            }
            item.Clear(); item.Add(3);//行政組長
            SDL = sDB.getAllStaffDataListRemindlist(item);
            foreach (StaffDataList atom in SDL)
            {

                    CreateRemind Remind = new CreateRemind();
                    Remind.executionDate = Chk.CheckStringtoDateFunction(StudentData.endReasonDate).AddDays(360).ToShortDateString();
                    Remind.recipientID = atom.sID;
                    Remind.executionContent = StudentData.studentName + " 離會第 365 天";
                    //cmd.Parameters.Add("@Executor", SqlDbType.Int).Value = Chk.CheckStringtoIntFunction(RemindSystemData.recipientID);
                    //cmd.Parameters.Add("@RemindContent", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(RemindSystemData.executionContent);
                    //cmd.Parameters.Add("@RemindDate", SqlDbType.Date).Value = Chk.CheckStringtoDateFunction(RemindSystemData.executionDate);
                    //cmd.Parameters.Add("@CompleteDate", SqlDbType.Date).Value = Chk.CheckStringtoDateFunction(RemindSystemData.fulfillmentDate);
                    oDB.CreateRemindSystem(Remind);

            }
            item.Clear(); item.Add(19);//中心行政
            SDL = sDB.getAllStaffDataList(item);
            foreach (StaffDataList atom in SDL)
            {
                if (atom.sUnit == StudentData.Unit)
                {
                    CreateRemind Remind = new CreateRemind();
                    Remind.executionDate = Chk.CheckStringtoDateFunction(StudentData.endReasonDate).AddDays(25).ToShortDateString();
                    Remind.recipientID = atom.sID;
                    Remind.executionContent = StudentData.studentName + " 結案30天要完成退保證金:" + Chk.CheckStringtoDateFunction(StudentData.endReasonDate).AddDays(30).ToShortDateString() ;
                    //cmd.Parameters.Add("@Executor", SqlDbType.Int).Value = Chk.CheckStringtoIntFunction(RemindSystemData.recipientID);
                    //cmd.Parameters.Add("@RemindContent", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(RemindSystemData.executionContent);
                    //cmd.Parameters.Add("@RemindDate", SqlDbType.Date).Value = Chk.CheckStringtoDateFunction(RemindSystemData.executionDate);
                    //cmd.Parameters.Add("@CompleteDate", SqlDbType.Date).Value = Chk.CheckStringtoDateFunction(RemindSystemData.fulfillmentDate);
                    oDB.CreateRemindSystem(Remind);
                }
            }
        }
        #endregion

        #region 轉換成通知系統
        //轉通知系統記錄)

        //評估日期 assessDate
        if (oldStudentDataBase1.assessDate == "1900-01-01" && oldStudentDataBase1.assessDate != Chk.CheckStringFunction(StudentData.assessDate) && Chk.CheckStringFunction(StudentData.assessDate).Length > 0)
        {
            List<int> item = new List<int>();
            item.Add(17);//社工管理長
            item.Add(18);//社工
            item.Add(19);//中心行政
            OtherDataBase oDB = new OtherDataBase();
            StaffDataBase sDB = new StaffDataBase();
            List<StaffDataList> SDL = sDB.getAllStaffDataList(item);
            foreach (StaffDataList atom in SDL)
            {
                if (atom.sUnit == StudentData.Unit)
                {
                    CreateRemind Remind = new CreateRemind();
                    Remind.executionDate = Chk.CheckStringtoDateFunction(StudentData.assessDate).AddDays(-5).ToShortDateString();
                    Remind.recipientID = atom.sID;
                    Remind.executionContent = StudentData.studentName + " 排定評估日期收咨詢費: " + Chk.CheckStringtoDateFunction(StudentData.assessDate).ToShortDateString() + " ";
                    oDB.CreateRemindSystem(Remind);
                }
            }
        }
        //首次上課 firstClassDate
        if (oldStudentDataBase1.firstClassDate == "1900-01-01" && oldStudentDataBase1.firstClassDate != Chk.CheckStringFunction(StudentData.firstClassDate) && Chk.CheckStringFunction(StudentData.firstClassDate).Length > 0)
        {
            List<int> item = new List<int>();
            item.Add(11);//主任
            item.Add(20);//主任/教師
            item.Add(21);//主任/聽力師
            item.Add(22);//主任/社工

            item.Add(15);//聽力師管理長
            item.Add(16);//聽力師
            item.Add(17);//社工管理長
            item.Add(18);//社工
            OtherDataBase oDB = new OtherDataBase();
            StaffDataBase sDB = new StaffDataBase();
            List<StaffDataList> SDL = sDB.getAllStaffDataList(item);
            foreach (StaffDataList atom in SDL)
            {
                if (atom.sUnit == StudentData.Unit)
                {
                    CreateRemind Remind = new CreateRemind();
                    Remind.executionDate = Chk.CheckStringtoDateFunction(StudentData.firstClassDate).AddDays(25).ToShortDateString();
                    Remind.recipientID = atom.sID;
                    Remind.executionContent = StudentData.studentName + " 首次上課30天內要完家訪和 ISP,首次上課日期 : " + Chk.CheckStringtoDateFunction(StudentData.firstClassDate).ToShortDateString() + " ";
                    oDB.CreateRemindSystem(Remind);
                }
            }
        }

        #endregion

        SqlConnection Sqlconn = new SqlConnection(Base.GetConnString());
        using (Sqlconn)
        {
            try
            {
                Sqlconn.Open();
                StaffDataBase sDB = new StaffDataBase();
                List<string> CreateFileName = sDB.getStaffDataName(HttpContext.Current.User.Identity.Name);
                string sql = "UPDATE StudentDatabase SET Unit=@Unit,EvaluationDate=@EvaluationDate, ConsultDate=@ConsultDate, Updated=(getdate()), CaseStatu=@CaseStatu, " +
                 "StudentName=@StudentName, StudentIdentity=@StudentIdentity, AddressZip1=@AddressZip1, " +
                    "AddressCity1=@AddressCity1, AddressOther1=@AddressOther1, AddressZip2=@AddressZip2, AddressCity2=@AddressCity2, AddressOther2=@AddressOther2, " +
                    "StudentBirthday=@StudentBirthday, StudentSex=@StudentSex, ClassDate=@ClassDate, GuaranteeDate= @GuaranteeDate, BackGuaranteeDate=@BackGuaranteeDate, CompletedDate=@CompletedDate, " +
                    "CompletedType=@CompletedType, CompletedReason=@CompletedReason, ShortEndDateSince=@ShortEndDateSince, ShortEndDateUntil=@ShortEndDateUntil, " +
                    "NomembershipType=@NomembershipType, NomembershipReason=@NomembershipReason, CaregiversDaytime=@CaregiversDaytime, " +
                    "CaregiversDaytimeText=@CaregiversDaytimeText, CaregiversNight=@CaregiversNight, CaregiversNightText=@CaregiversNightText, ContactRelation1=@ContactRelation1, " +
                    "ContactName1=@ContactName1, ContactTel_company1=@ContactTel_company1, ContactTel_home1=@ContactTel_home1, ContactPhone1=@ContactPhone1, " +
                    "ContactFax1=@ContactFax1, ContactRelation2=@ContactRelation2, ContactName2=@ContactName2, ContactTel_company2=@ContactTel_company2, " +
                    "ContactTel_home2=@ContactTel_home2, ContactPhone2=@ContactPhone2, ContactFax2=@ContactFax2, ContactRelation3=@ContactRelation3, ContactName3=@ContactName3, " +
                    "ContactTel_company3=@ContactTel_company3, ContactTel_home3=@ContactTel_home3, ContactPhone3=@ContactPhone3, ContactFax3=@ContactFax3, " +
                    "ContactRelation4=@ContactRelation4, ContactName4=@ContactName4, ContactTel_company4=@ContactTel_company4, ContactTel_home4=@ContactTel_home4, " +
                    "ContactPhone4=@ContactPhone4, ContactFax4=@ContactFax4, StudentEmail=@StudentEmail, ReferralSourceType=@ReferralSourceType, ReferralSource=@ReferralSource, " +
                    "PhysicalAndMentalDisabilityHandbook=@PhysicalAndMentalDisabilityHandbook, DisabilityCategory1= @DisabilityCategory1, DisabilityGrade1=@DisabilityGrade1, " +
                    "DisabilityCategory2=@DisabilityCategory2, DisabilityGrade2=@DisabilityGrade2, DisabilityCategory3=@DisabilityCategory3, DisabilityGrade3=@DisabilityGrade3, " +
                    "NoDisabilityHandbook=@NoDisabilityHandbook, ApplyDisabilityHandbook=@ApplyDisabilityHandbook, Notify=@Notify, " +
                    "Notify_Unit=@Notify_Unit, Notify_Member=@Notify_Member, Notify_Tel=@Notify_Tel, Notify_Date=@Notify_Date, Notify_City=@Notify_City, EconomyState=@EconomyState, " +
                    "EconomyLow=@EconomyLow ," + upPhoto + " UpFileBy=@UpFileBy, UpFileDate=(getDate()) " +
                    "WHERE StudentID=@StudentID AND ID=@ID";
                SqlCommand cmd = new SqlCommand(sql, Sqlconn);
                cmd.Parameters.Add("@ID", SqlDbType.BigInt).Value = StudentData.ID;
                cmd.Parameters.Add("@Unit", SqlDbType.Int).Value = Chk.CheckStringtoIntFunction(StudentData.Unit);
                cmd.Parameters.Add("@StudentID", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.studentID);
                cmd.Parameters.Add("@EvaluationDate", SqlDbType.Date).Value = Chk.CheckStringtoDateFunction(StudentData.assessDate);
                cmd.Parameters.Add("@ConsultDate", SqlDbType.Date).Value = Chk.CheckStringtoDateFunction(StudentData.consultationDate);
                cmd.Parameters.Add("@Updated", SqlDbType.Date).Value = Chk.CheckStringtoDateFunction(StudentData.upDate);
                cmd.Parameters.Add("@CaseStatu", SqlDbType.TinyInt).Value = Chk.CheckIntFunction(CaseStatu);
                //cmd.Parameters.Add("@WriteName", SqlDbType.Int).Value = Chk.CheckStringtoIntFunction(StudentData.fillInName);
                cmd.Parameters.Add("@StudentName", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.studentName);
                cmd.Parameters.Add("@StudentIdentity", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.studentTWID);
                cmd.Parameters.Add("@AddressZip1", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.censusAddressZip);
                cmd.Parameters.Add("@AddressCity1", SqlDbType.TinyInt).Value = Chk.CheckStringtoIntFunction(StudentData.censusAddressCity);
                cmd.Parameters.Add("@AddressOther1", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.censusAddress);
                cmd.Parameters.Add("@AddressZip2", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.addressZip);
                cmd.Parameters.Add("@AddressCity2", SqlDbType.TinyInt).Value = Chk.CheckStringtoIntFunction(StudentData.addressCity);
                cmd.Parameters.Add("@AddressOther2", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.address);
                cmd.Parameters.Add("@StudentBirthday", SqlDbType.Date).Value = Chk.CheckStringtoDateFunction(StudentData.studentbirthday);
                cmd.Parameters.Add("@StudentSex", SqlDbType.TinyInt).Value = Chk.CheckStringtoIntFunction(StudentData.studentSex);
                cmd.Parameters.Add("@ClassDate", SqlDbType.Date).Value = Chk.CheckStringtoDateFunction(StudentData.firstClassDate);
                cmd.Parameters.Add("@GuaranteeDate", SqlDbType.Date).Value = Chk.CheckStringtoDateFunction(StudentData.guaranteeDate);
                cmd.Parameters.Add("@BackGuaranteeDate", SqlDbType.Date).Value = Chk.CheckStringtoDateFunction(StudentData.BackGuaranteeDate);

                cmd.Parameters.Add("@CompletedDate", SqlDbType.Date).Value = Chk.CheckStringtoDateFunction(StudentData.endReasonDate);
                cmd.Parameters.Add("@CompletedType", SqlDbType.TinyInt).Value = Chk.CheckStringtoIntFunction(StudentData.endReasonType);
                cmd.Parameters.Add("@CompletedReason", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.endReason);
                cmd.Parameters.Add("@ShortEndDateSince", SqlDbType.Date).Value = Chk.CheckStringtoDateFunction(StudentData.sendDateSince);
                cmd.Parameters.Add("@ShortEndDateUntil", SqlDbType.Date).Value = Chk.CheckStringtoDateFunction(StudentData.sendDateUntil);
                cmd.Parameters.Add("@NomembershipType", SqlDbType.TinyInt).Value = Chk.CheckStringtoIntFunction(StudentData.nomembershipType);
                cmd.Parameters.Add("@NomembershipReason", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.nomembershipReason);
                cmd.Parameters.Add("@StudentAvatar", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.studentPhoto);
                cmd.Parameters.Add("@CaregiversDaytime", SqlDbType.TinyInt).Value = Chk.CheckStringtoIntFunction(StudentData.wCare);
                cmd.Parameters.Add("@CaregiversDaytimeText", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.wCareName);
                cmd.Parameters.Add("@CaregiversNight", SqlDbType.TinyInt).Value = Chk.CheckStringtoIntFunction(StudentData.bCare);
                cmd.Parameters.Add("@CaregiversNightText", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.bCareName);
                cmd.Parameters.Add("@ContactRelation1", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPRelation1);
                cmd.Parameters.Add("@ContactName1", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPName1);
                cmd.Parameters.Add("@ContactTel_company1", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPTel1);
                cmd.Parameters.Add("@ContactPhone1", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPPhone1);
                cmd.Parameters.Add("@ContactTel_home1", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPHPhone1);
                cmd.Parameters.Add("@ContactFax1", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPFax1);
                cmd.Parameters.Add("@ContactRelation2", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPRelation2);
                cmd.Parameters.Add("@ContactName2", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPName2);
                cmd.Parameters.Add("@ContactTel_company2", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPTel2);
                cmd.Parameters.Add("@ContactPhone2", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPPhone2);
                cmd.Parameters.Add("@ContactTel_home2", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPHPhone2);
                cmd.Parameters.Add("@ContactFax2", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPFax2);
                cmd.Parameters.Add("@ContactRelation3", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPRelation3);
                cmd.Parameters.Add("@ContactName3", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPName3);
                cmd.Parameters.Add("@ContactTel_company3", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPTel3);
                cmd.Parameters.Add("@ContactPhone3", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPPhone3);
                cmd.Parameters.Add("@ContactTel_home3", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPHPhone3);
                cmd.Parameters.Add("@ContactFax3", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPFax3);
                cmd.Parameters.Add("@ContactRelation4", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPRelation4);
                cmd.Parameters.Add("@ContactName4", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPName4);
                cmd.Parameters.Add("@ContactTel_company4", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPTel4);
                cmd.Parameters.Add("@ContactPhone4", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPPhone4);
                cmd.Parameters.Add("@ContactTel_home4", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPHPhone4);
                cmd.Parameters.Add("@ContactFax4", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.fPFax4);
                cmd.Parameters.Add("@StudentEmail", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.email);
                cmd.Parameters.Add("@ReferralSourceType", SqlDbType.TinyInt).Value = Chk.CheckStringtoIntFunction(StudentData.sourceType);
                cmd.Parameters.Add("@ReferralSource", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.sourceName);
                cmd.Parameters.Add("@PhysicalAndMentalDisabilityHandbook", SqlDbType.TinyInt).Value = Chk.CheckStringtoIntFunction(StudentData.manualWhether);
                cmd.Parameters.Add("@DisabilityCategory1", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.manualCategory1);
                cmd.Parameters.Add("@DisabilityGrade1", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.manualGrade1);
                cmd.Parameters.Add("@DisabilityCategory2", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.manualCategory2);
                cmd.Parameters.Add("@DisabilityGrade2", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.manualGrade2);
                cmd.Parameters.Add("@DisabilityCategory3", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.manualCategory3);
                cmd.Parameters.Add("@DisabilityGrade3", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.manualGrade3);
                cmd.Parameters.Add("@NoDisabilityHandbook", SqlDbType.TinyInt).Value = Chk.CheckStringtoIntFunction(StudentData.manualNo);
                cmd.Parameters.Add("@ApplyDisabilityHandbook", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.manualUnit);
                cmd.Parameters.Add("@DisabilityProve", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.studentManualImg);
                cmd.Parameters.Add("@Notify", SqlDbType.TinyInt).Value = Chk.CheckStringtoIntFunction(StudentData.notificationWhether);
                cmd.Parameters.Add("@Notify_Unit", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.notificationUnit);
                cmd.Parameters.Add("@Notify_Member", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.notificationManage);
                cmd.Parameters.Add("@Notify_Tel", SqlDbType.NVarChar).Value = Chk.CheckStringFunction(StudentData.notificationTel);
                cmd.Parameters.Add("@Notify_Date", SqlDbType.Date).Value = Chk.CheckStringtoDateFunction(StudentData.notificationDate);
                cmd.Parameters.Add("@Notify_City", SqlDbType.TinyInt).Value = Chk.CheckStringtoIntFunction(StudentData.notificationCity);
                cmd.Parameters.Add("@EconomyState", SqlDbType.TinyInt).Value = Chk.CheckStringtoIntFunction(StudentData.economy);
                cmd.Parameters.Add("@EconomyLow", SqlDbType.TinyInt).Value = Chk.CheckStringtoIntFunction(StudentData.economyLow);
                cmd.Parameters.Add("@UpFileBy", SqlDbType.Int).Value = Chk.CheckStringtoIntFunction(CreateFileName[0]);
                returnValue[0] = cmd.ExecuteNonQuery().ToString();
                Sqlconn.Close();
            }
            catch (Exception e)
            {
                string error = e.Message;
                returnValue[0] = "-1";
                returnValue[1] = e.Message;
            }
        }
        return returnValue;
    }