예제 #1
0
        //scan Awbno
        public JsonResult Scan_Awb_No_ByUser([FromBody] Manifest_Line line)
        {
            Main objmain = new Main();

            string[]    result = new string[2];
            string      NavXml = objmain.Scan_Awb_No_ByUser(line);
            XmlDocument apiXml = new XmlDocument();

            apiXml.LoadXml(NavXml);
            XmlNodeList error = apiXml.GetElementsByTagName("faultstring");

            if (error.Count > 0)
            {
                DataTable dt = new DataTable();

                dt.Columns.Add("condition", typeof(System.String));
                dt.Columns.Add("Message", typeof(System.String));
                dt.Rows.Add();
                dt.Rows[0]["condition"] = "False";
                dt.Rows[0]["Message"]   = error[0].InnerXml;
                return(objmain.DataTableToJsonWithJsonNet(dt));
            }
            XmlNodeList success = apiXml.GetElementsByTagName("return_value");

            if (success.Count > 0)
            {
                return(Get_Manifest_Full_Detail(line.locatin, line.dsp_partner_code, line.createdby));
            }
            return(new JsonResult("BAD"));
        }
예제 #2
0
        //delete Manifest Line
        public JsonResult manifest_API_delete([FromBody] Manifest_Line line)
        {
            Main objmain = new Main();

            string[]    returnarray = new string[2];
            string      result      = objmain.manifest_API_delete(line);
            XmlDocument Navisionxml = new XmlDocument();

            Navisionxml.LoadXml(result);
            XmlNodeList error = Navisionxml.GetElementsByTagName("faultstring");

            if (error.Count > 0)
            {
                DataTable dt = new DataTable();
                dt.Columns.Add("condition", typeof(System.String));
                dt.Columns.Add("Message", typeof(System.String));
                dt.Rows.Add();
                dt.Rows[0]["condition"] = "False";
                dt.Rows[0]["Message"]   = error[0].InnerXml;
                return(objmain.DataTableToJsonWithJsonNet(dt));
            }
            XmlNodeList success = Navisionxml.GetElementsByTagName("return_value");

            if (success.Count > 0)
            {
                returnarray[0] = "true";
                returnarray[1] = "Done";
                int Deleledata = objmain.Delete_Manifest_line_Manifestno(line, "Manifestlinedelete");
                return(Get_Manifest_Full_Detail(line.locatin, line.dsp_partner_code, line.createdby));
            }
            return(new JsonResult("BAD"));
        }
예제 #3
0
        //bind data
        public JsonResult Delete_Manifest([FromBody] Manifest_Line line)
        {
            Main objmain = new Main();

            string[]    returnarray = new string[2];
            string      result      = objmain.manifest_API_header_delete(line);
            XmlDocument Navisionxml = new XmlDocument();

            Navisionxml.LoadXml(result);
            XmlNodeList error = Navisionxml.GetElementsByTagName("faultstring");

            if (error.Count > 0)
            {
                returnarray[0] = "false";
                returnarray[1] = error[0].InnerXml;
            }
            XmlNodeList success = Navisionxml.GetElementsByTagName("return_value");

            if (success.Count > 0)
            {
                returnarray[0] = "true";
                returnarray[1] = "Done";
                int Deletedone = objmain.Delete_Manifest_Header_by_Manifestno(line, "DeleteByManifestNo");
            }

            return(new JsonResult(returnarray));
        }
예제 #4
0
        // insert line by navision
        public string Insert_Menifest_Line([FromBody] Manifest_Line manidata)
        {
            Main objmain = new Main();
            int  result  = objmain.manifest_Line_insert(manidata);

            if (result > 0)
            {
                return("Susssfull Insert");
            }
            else
            {
                return("UnSusssfull Insert");
            }
        }