예제 #1
0
        private static void TestGSTR1Save(string gstin, string fp, string ctin, string etin)
        {
            GSTNAuthClient client   = GetAuth(gstin);
            var            filename = "sampledata\\b2bout.json";

            if (String.IsNullOrEmpty(ctin))
            {
                System.Console.Write("Enter CTIN:");
                ctin = System.Console.ReadLine();
            }
            if (String.IsNullOrEmpty(etin))
            {
                System.Console.Write("Enter ETIN:");
                etin = System.Console.ReadLine();
            }

            var str1 = File.ReadAllText(filename).Replace("%ctin%", ctin).Replace("%etin%", etin);

            GSTR1.GSTR1Total model = JsonConvert.DeserializeObject <GSTR1.GSTR1Total>(str1);
            model.gstin = gstin;
            model.fp    = fp;
            GSTR1ApiClient client2 = new GSTR1ApiClient(client, gstin, fp);
            var            info    = client2.Save(model);

            GetStatus(client2, info.Data, fp);
        }
예제 #2
0
파일: Program.cs 프로젝트: Risersoft/GST
        private static void TestGSTR1Save(IGSTNAuthProvider auth, string gstin, string userid, string fp, string ctin, string etin)
        {
            var filename = "sampledatatp\\gstr1.json";

            if (String.IsNullOrEmpty(ctin))
            {
                System.Console.Write("Enter CTIN:");
                ctin = System.Console.ReadLine();
            }
            if (String.IsNullOrEmpty(etin))
            {
                System.Console.Write("Enter ETIN:");
                etin = System.Console.ReadLine();
            }

            var str1     = File.ReadAllText(filename).Replace("%ctin%", ctin).Replace("%etin%", etin);
            var settings = new JsonSerializerSettings
            {
                NullValueHandling     = NullValueHandling.Ignore,
                MissingMemberHandling = MissingMemberHandling.Ignore
            };

            GSTR1.GSTR1Total model = JsonConvert.DeserializeObject <GSTR1.GSTR1Total>(str1, settings);
            model.gstin = gstin;
            model.fp    = fp;
            GSTR1ApiClient client2 = new GSTR1ApiClient(auth, gstin, userid, fp);
            var            str2    = client2.Serialize(model);
            var            info    = client2.Save(model);

            System.Console.WriteLine("Reference_ID: " + info.Data.reference_id);
            var status = client2.GetStatus(info.Data.reference_id);

            System.Console.WriteLine(JsonConvert.SerializeObject(status.Data));
        }
예제 #3
0
파일: Program.cs 프로젝트: Risersoft/GST
        private static void TestGSTR1Get(IGSTNAuthProvider client, string gstin, string userid, string fp)
        {
            GSTR1.GSTR1Total model   = new GSTR1.GSTR1Total();
            GSTR1ApiClient   client2 = new GSTR1ApiClient(client, gstin, userid, fp);

            model = client2.GetSection("B2B", "", "", "").Data;
        }
예제 #4
0
        private static void TestGSTR1Get(string gstin, string fp)
        {
            GSTNAuthClient client = GetAuth(gstin);

            GSTR1.GSTR1Total model   = new GSTR1.GSTR1Total();
            GSTR1ApiClient   client2 = new GSTR1ApiClient(client, gstin, fp);

            model.b2b = client2.GetB2B("").Data;
        }
예제 #5
0
        private static void TestGSTR1(string gstin, string fp)
        {
            GSTNAuthClient client = GetAuth(gstin);

            GSTR1.GSTR1Total model   = new GSTR1.GSTR1Total();
            GSTR1ApiClient   client2 = new GSTR1ApiClient(client, gstin, fp);

            model.b2b  = client2.GetB2B("").Data;
            model.b2cl = client2.GetB2CL("01").Data;
            var result3 = client2.Save(model);
        }
예제 #6
0
        private static string TestCSV(string gstin, string fp)
        {
            GSTNAuthClient client = GetAuth(gstin);

            GSTR1.GSTR1Total model   = new GSTR1.GSTR1Total();
            GSTR1ApiClient   client2 = new GSTR1ApiClient(client, gstin, fp);

            model.b2b = client2.GetB2B("Y").Data;

            var    client3 = new MxApiClient("http://www.maximprise.com/api/gst");
            string str1    = client3.Json2CSV(client2.LastJson, "gstr1", "b2b").Data;

            return(str1);
        }
예제 #7
0
파일: Program.cs 프로젝트: Risersoft/GST
        private static string TestCSV(string gstin, string gsp, string userid, string fp)
        {
            IGSTNAuthProvider client = GetAuth(gstin, gsp, userid);

            GSTR1.GSTR1Total model   = new GSTR1.GSTR1Total();
            GSTR1ApiClient   client2 = new GSTR1ApiClient(client, gstin, userid, fp);

            model = client2.GetSection("B2B", "", "Y", "").Data;

            var    client3 = new MxApiClient("http://www.maximprise.com/api/gst");
            string str1    = client3.Json2CSV(client2.dicParams["ResponsePayload"], "gstr1", "b2b").Data;

            return(str1);
        }
예제 #8
0
파일: Program.cs 프로젝트: Risersoft/GST
        private static void TestGSTR1Save2(IGSTNAuthProvider auth, string gstin, string userid, string fp, string ctin, string etin)
        {
            GSTR1.GSTR1Total model = new GSTR1.GSTR1Total();
            model.gstin = gstin;
            model.fp    = fp;
            model.b2cs  = new List <GSTR1.B2csOutward>
            {
                new GSTR1.B2csOutward
                {
                    rt   = 5,
                    iamt = 100
                }
            };
            GSTR1ApiClient client2 = new GSTR1ApiClient(auth, gstin, userid, fp);
            var            str2    = client2.Serialize(model);
            var            info    = client2.Save(model);

            System.Console.WriteLine("Reference_ID: " + info.Data.reference_id);
            var status = client2.GetStatus(info.Data.reference_id);

            System.Console.WriteLine(JsonConvert.SerializeObject(status.Data));
        }