예제 #1
0
 public bool Insert(SndNohinSyohinKaisyu nohinWork)
 {
     try
     {
         using (var connection = new SQLiteConnection(System.IO.Path.Combine(folder, dbFileName)))
         {
             connection.Insert(nohinWork);
             return(true);
         }
     }
     catch (SQLiteException ex)
     {
         Log.Info("SQLiteEx", ex.Message);
         return(false);
     }
 }
예제 #2
0
        private void appendFile(string kamotu_no)
        {
            // レコード作成用 値取得
            SndNohinSyohinKaisyu sndNohinSyohinKaisyu = new SndNohinSyohinKaisyu
            {
                wPackage          = "02",
                wTerminalID       = "11101",
                wProgramID        = prefs.GetString("program_id", "NOH"),
                wSagyosyaCD       = prefs.GetString("sagyousya_cd", "99999"),
                wSoukoCD          = prefs.GetString("souko_cd", "108"),
                wHaisoDate        = "0",
                wBinNo            = prefs.GetString("bin_no", ""),
                wCourse           = prefs.GetString("course", ""),
                wDriverCD         = "",
                wTokuisakiCD      = prefs.GetString("tokuisaki_cd", ""),
                wTodokesakiCD     = prefs.GetString("todokesaki_cd", ""),
                wKanriNo          = "",
                wVendorCd         = prefs.GetString("vendor_cd", ""),
                wMateVendorCd     = "",
                wSyukaDate        = prefs.GetString("haiso_date", ""),
                wButsuryuNo       = "",
                wKamotuNo         = kamotu_no,
                wMatehan          = "",
                wMatehanSu        = "0",
                wHHT_no           = "11101",
                wNohinKbn         = "1", // 商品回収
                wKaisyuKbn        = "0",
                wTenkanState      = "00",
                wSakiTokuisakiCD  = "",
                wSakiTodokesakiCD = "",
                wNohinDate        = prefs.GetString("nohin_date", ""),
                wNohinTime        = prefs.GetString("nohin_time", "")
            };

            SndNohinSyohinKaisyuHelper nohinWorkHelper = new SndNohinSyohinKaisyuHelper();

            nohinWorkHelper.Insert(sndNohinSyohinKaisyu);
        }
예제 #3
0
        private Dictionary <string, string> SetSendParam(object param)
        {
            Dictionary <string, string> result = new Dictionary <string, string>();

            if (param.GetType() == typeof(SndNohinMail))
            {
                SndNohinMail temp = ((SndNohinMail)param);

                result = new Dictionary <string, string>
                {
                    { "pPackage", temp.wPackage },
                    { "pTerminalID", temp.wTerminalID },
                    { "pProgramID", temp.wProgramID },
                    { "pSagyosyaCD", temp.wSagyosyaCD },
                    { "pSoukoCD", temp.wSoukoCD },
                    { "pHaisoDate", temp.wHaisoDate },
                    { "pBinNo", temp.wBinNo },
                    { "pCourse", temp.wCourse },
                    { "pDriverCD", temp.wDriverCD },
                    { "pTokuisakiCD", temp.wTokuisakiCD },
                    { "pTodokesakiCD", temp.wTodokesakiCD },
                    { "pKanriNo", temp.wKanriNo },
                    { "pVendorCD", temp.wVendorCd },
                    { "pMatehanVendor", temp.wMateVendorCd },
                    { "pSyukaDate", temp.wSyukaDate },
                    { "pButsuryuNo", temp.wButsuryuNo },
                    { "pKamotsuNo", temp.wKamotuNo },
                    { "pMatehan", temp.wMatehan },
                    { "pMatehan_Su", temp.wMatehanSu },
                    { "pHHT_No", temp.wHHT_no }
                };
            }
            else if (param.GetType() == typeof(SndNohinMailKaisyu))
            {
                SndNohinMailKaisyu temp = ((SndNohinMailKaisyu)param);

                result = new Dictionary <string, string>
                {
                    { "pPackage", temp.wPackage },
                    { "pTerminalID", temp.wTerminalID },
                    { "pProgramID", temp.wProgramID },
                    { "pSagyosyaCD", temp.wSagyosyaCD },
                    { "pSoukoCD", temp.wSoukoCD },
                    { "pHaisoDate", temp.wHaisoDate },
                    { "pBinNo", temp.wBinNo },
                    { "pCourse", temp.wCourse },
                    { "pDriverCD", temp.wDriverCD },
                    { "pTokuisakiCD", temp.wTokuisakiCD },
                    { "pTodokesakiCD", temp.wTodokesakiCD },
                    { "pKanriNo", temp.wKanriNo },
                    { "pVendorCD", temp.wVendorCd },
                    { "pMatehanVendor", temp.wMateVendorCd },
                    { "pSyukaDate", temp.wSyukaDate },
                    { "pButsuryuNo", temp.wButsuryuNo },
                    { "pKamotsuNo", temp.wKamotuNo },
                    { "pMatehan", temp.wMatehan },
                    { "pMatehan_Su", temp.wMatehanSu },
                    { "pHHT_No", temp.wHHT_no },
                };
            }
            else if (param.GetType() == typeof(SndNohinMate))
            {
                SndNohinMate temp = ((SndNohinMate)param);

                result = new Dictionary <string, string>
                {
                    { "pPackage", temp.wPackage },
                    { "pTerminalID", temp.wTerminalID },
                    { "pProgramID", temp.wProgramID },
                    { "pSagyosyaCD", temp.wSagyosyaCD },
                    { "pSoukoCD", temp.wSoukoCD },
                    { "pHaisoDate", temp.wHaisoDate },
                    { "pBinNo", temp.wBinNo },
                    { "pCourse", temp.wCourse },
                    { "pDriverCD", temp.wDriverCD },
                    { "pTokuisakiCD", temp.wTokuisakiCD },
                    { "pTodokesakiCD", temp.wTodokesakiCD },
                    { "pKanriNo", temp.wKanriNo },
                    { "pVendorCD", temp.wVendorCd },
                    { "pMatehanVendor", temp.wMateVendorCd },
                    { "pSyukaDate", temp.wSyukaDate },
                    { "pButsuryuNo", temp.wButsuryuNo },
                    { "pKamotsuNo", temp.wKamotuNo },
                    { "pMatehan", temp.wMatehan },
                    { "pMatehan_Su", temp.wMatehanSu },
                    { "pHHT_No", temp.wHHT_no },
                };
            }
            else if (param.GetType() == typeof(SndNohinWork))
            {
                SndNohinWork temp = ((SndNohinWork)param);

                result = new Dictionary <string, string>
                {
                    { "pPackage", temp.wPackage },
                    { "pTerminalID", temp.wTerminalID },
                    { "pProgramID", temp.wProgramID },
                    { "pSagyosyaCD", temp.wSagyosyaCD },
                    { "pSoukoCD", temp.wSoukoCD },
                    { "pHaisoDate", temp.wHaisoDate },
                    { "pBinNo", temp.wBinNo },
                    { "pCourse", temp.wCourse },
                    { "pDriverCD", temp.wDriverCD },
                    { "pTokuisakiCD", temp.wTokuisakiCD },
                    { "pTodokesakiCD", temp.wTodokesakiCD },
                    { "pKanriNo", temp.wKanriNo },
                    { "pVendorCD", temp.wVendorCd },
                    { "pMatehanVendor", temp.wMateVendorCd },
                    { "pSyukaDate", temp.wSyukaDate },
                    { "pButsuryuNo", temp.wButsuryuNo },
                    { "pKamotsuNo", temp.wKamotuNo },
                    { "pMatehan", temp.wMatehan },
                    { "pMatehan_Su", temp.wMatehanSu },
                    { "pHHT_No", temp.wHHT_no },
                    { "pNohinKbn", temp.wNohinKbn },
                    { "pTenkanState", temp.wTenkanState },
                    { "pKaisyuKbn", temp.wKaisyuKbn },
                    { "pSakiTokuisakiCD", temp.wSakiTokuisakiCD },
                    { "pSakiTodokesakiCD", temp.wSakiTodokesakiCD },
                    { "pNohinDate", temp.wNohinDate },
                    { "pNohinTime", temp.wNohinTime }
                };
            }
            else if (param.GetType() == typeof(SndNohinSyohinKaisyu))
            {
                SndNohinSyohinKaisyu temp = ((SndNohinSyohinKaisyu)param);

                result = new Dictionary <string, string>
                {
                    { "pPackage", temp.wPackage },
                    { "pTerminalID", temp.wTerminalID },
                    { "pProgramID", temp.wProgramID },
                    { "pSagyosyaCD", temp.wSagyosyaCD },
                    { "pSoukoCD", temp.wSoukoCD },
                    { "pHaisoDate", temp.wHaisoDate },
                    { "pBinNo", temp.wBinNo },
                    { "pCourse", temp.wCourse },
                    { "pDriverCD", temp.wDriverCD },
                    { "pTokuisakiCD", temp.wTokuisakiCD },
                    { "pTodokesakiCD", temp.wTodokesakiCD },
                    { "pKanriNo", temp.wKanriNo },
                    { "pVendorCD", temp.wVendorCd },
                    { "pMatehanVendor", temp.wMateVendorCd },
                    { "pSyukaDate", temp.wSyukaDate },
                    { "pButsuryuNo", temp.wButsuryuNo },
                    { "pKamotsuNo", temp.wKamotuNo },
                    { "pMatehan", temp.wMatehan },
                    { "pMatehan_Su", temp.wMatehanSu },
                    { "pHHT_No", temp.wHHT_no },
                };
            }

            return(result);
        }