Beispiel #1
0
        /// <summary>
        /// GetExcelData
        ///     : Upload할 엑셀파일을 DataSet으로 리턴
        /// </summary>
        /// <param name="asFilePath"></param>
        /// <returns></returns>
        public DataSet GetExcelData(string asFilePath)
        {
            DataSet lDS = new DataSet();

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Suppress))
            {
                Dac_ctl_ctlPassExcel_Upload dac = new Dac_ctl_ctlPassExcel_Upload();

                lDS = dac.GetExcelData(asFilePath);

                scope.Complete();
            }

            return(lDS);
        }
Beispiel #2
0
        /// <summary>
        /// UpdateEmpPass
        ///     : 사용자 비밀번호 일괄 업데이트
        /// </summary>
        /// <param name="asFilePath"></param>
        /// <returns></returns>
        public int UpdateEmpPass(string asFilePath)
        {
            int     iRet = 0;
            DataSet lDS  = new DataSet();

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Suppress))
            {
                Dac_ctl_ctlPassExcel_Upload dac = new Dac_ctl_ctlPassExcel_Upload();
                lDS = GetExcelData(asFilePath);

                foreach (DataRow dr in lDS.Tables[0].Rows)
                {
                    iRet += dac.SetExcelUpdate(dr[0].ToString(), dr[2].ToString());
                }

                scope.Complete();
            }

            return(iRet);
        }