Ejemplo n.º 1
0
        public string GetInwardStock(string exAttribute, int refType)
        {
            string InputValue = CXmlPara.CreatePara(exAttribute);

            if (refType == 7)
            {
                CInward inward = iv_service.GetInward(InputValue);
                return(CJson.SerializeObject(inward));
            }
            else
            {
                COutward outward = iv_service.GetOutward(InputValue);
                return(CJson.SerializeObject(outward));
            }
        }
Ejemplo n.º 2
0
        protected string GetInwardStock(CInward item)
        {
            StringBuilder ret = new StringBuilder();

            ret.Append("{");
            ret.AppendFormat("'ID':'{0}',", item.ID);
            ret.AppendFormat("'InwardNo':'{0}',", item.Code);
            ret.AppendFormat("'VoucherDate':'{0}',", item.VoucherDate);
            ret.AppendFormat("'Description':'{0}',", item.Description);
            ret.AppendFormat("'CreatedByName':'{0}',", item.CreatedBy);
            ret.AppendFormat("'Partner':'{0}',", item.PostedBy);
            ret.AppendFormat("'TotalAmount':'{0}',", item.Amount);
            ret.AppendFormat("'Action':'{0}'", 1);
            ret.Append("}");
            string result = string.Empty;

            if (ret.Length > 0)
            {
                result = ret.ToString().Replace("'", "\"");
            }
            return(result);
        }