[ExtJs4.0]數據從excle2003導入到數據庫【2-2-2】

if (increaseNumber != reduceNumber)

                            {

                                return ExtjsFormFail("̨²" + (i + 2) + "D?¨®º¨¦¨ª?¦¨´ºy?" + increaseNumber + "?¨ª?" + reduceNumber + "?ºyY?¨¤Ì¨¨ê??ÁD???ê?");

                            }

                            currentAccountInfo.CertificateNumber = table.Rows[i][4].ToString().Trim();

                            currentAccountInfo.Remark = table.Rows[i][5].ToString().Trim();

                            string increaseStationCode = table.Rows[i][6].ToString().Trim();

                            if (!CheckStation(increaseStationCode))//¨¦¡èª?Ì?䨲?¨²ª??¦?º?¤?ä?¨²

                            {

                                return ExtjsFormFail("̨²" + (i + 2) + "D̨²7¢D?¨®ª?Ì?À¨¤??" + increaseStationCode + "??ä?¨²ê??ÁD???ê?");

                            }

                            currentAccountInfo.IncreaseStationCode = table.Rows[i][6].ToString().Trim();

 

                            string reduceStationCode = table.Rows[i][7].ToString().Trim();

                            if (!CheckStation(reduceStationCode))//¨¦¡èª?Ì?䨲?¨²ª??¦?º?¤?ä?¨²

                            {

                                return ExtjsFormFail("̨²" + (i + 2) + "D̨²8¢D?¦¨´ª?Ì?À¨¤??" + reduceStationCode + "??ä?¨²ê??ÁD???ê?");

                            }

                            currentAccountInfo.ReduceStationCode = table.Rows[i][7].ToString().Trim();

                            string typeId = table.Rows[i][8].ToString().Trim();

                            DataDictionaryService dictionaryService = new DataDictionaryService();

                            IList<BasicDataDictionaryInfo> infos = dictionaryService.FindByTypeCode("CurrentAccount");

                            int x = infos.Count;

                            foreach (var Info in infos)//¨ª¤??Ì?¤¨¤¨ªÁ?À¨¨?

                            {

                                if (Info.Name.Trim() == typeId.Trim())

                                {

                                    x--;

                                    currentAccountInfo.TypeId = Info.Id.ToString();//table.Rows[i][8].ToString().Trim();

                                }

                            }

                            if (x == infos.Count)

                            {

                                return ExtjsFormFail("̨²" + (i + 2) + "D̨²9¢D¤¨¤¨ªÁ???" + typeId + "??ä?¨²ê??ÁD???(D?®D?®D¡ä䨪)ê?");

                            }

                            currentAccountInfo.IsDeleted = 0;

                            currentList.Add(currentAccountInfo);

                        }

                    }

                    CurrentAccountBiz.InsertCurrentAccount(currentList);

                }

                return ExtjsFormSuccess();

            }

            catch (Exception ex)

            {

                return ExtjsFormFail("Ì?¨?ºyYº¡ì㨹ê??¨¬¨¦?t¤¨¤¨ª!°¨¬¡ê?¡éêo" + ex.Message);

            }

        }

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章