コード例 #1
0
        public static int InsertSalecylceLines(SalesCyleMaster obj)
        {
            DBHelper  DBConn = new DBHelper();
            DataTable dt;

            SqlParameter[] sqlparam;
            sqlparam = new SqlParameter[3];

            sqlparam[0] = new SqlParameter("@id", '0');
            sqlparam[1] = new SqlParameter("@Code", obj.Code);
            sqlparam[2] = new SqlParameter("@Description", obj.Description);

            int a = DBConn.Save("InsertSalesCylceLines", sqlparam, "");

            return(a);
        }
コード例 #2
0
        public static JArray parseJsonSalesCycleLines(string result)
        {
            JArray conversion = null;

            try
            {
                var jObject2 = JObject.Parse(result);
                //dynamic json = JValue.Parse(result.ToString());
                //conversion = (JArray)json.value;

                JArray items = (JArray)jObject2["value"];
                for (int i = 0; i < items.Count; i++)
                {
                    SalesCyleMaster obj = new SalesCyleMaster();
                    obj.Code        = (string)jObject2["value"][i]["Code"];
                    obj.Description = (string)jObject2["value"][i]["Description"];
                    SyncSalesCycle.InsertSalecylceLines(obj);
                }
            }
            catch (Exception e)
            {
            }
            return(conversion);
        }