Пример #1
0
        public static JsonMessage GetResourceNo(string sourceNo)
        {
            JsonMessage j = new JsonMessage();;

            try
            {
                j.Status = 1;
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("sourceNo", sourceNo);
                DataTable     dt = GBDataProvider.GetSourceItem(parms);
                SourceNoModel m  = new SourceNoModel()
                {
                    SourceNo = "ABC"
                };
                m.Items = ItemModel.GetItemsByDt(dt);
                j.Data  = dt;

                return(j);
            }
            catch (Exception e)
            {
                j.Status  = 0;
                j.Message = e.Message;
            }
            return(j);
        }
Пример #2
0
        private ResponseObject GetReponse(Dictionary <string, object> parms, string psName)
        {
            ResponseObject o = new ResponseObject();

            try
            {
                GBDataProvider provider = new GBDataProvider();
                o.Data   = provider.ExecStoreProcedureForGettingTable(parms, psName);
                o.Status = 1;
            }
            catch (Exception ex)
            {
                o.Status = 0;
                o.Msg    = ex.Message;
            }

            return(o);
        }
Пример #3
0
        public static JsonMessage GetUser(string userno)
        {
            JsonMessage j = new JsonMessage();;

            try
            {
                j.Status = 1;
                Dictionary <string, object> parms = new Dictionary <string, object>();
                parms.Add("userno", userno);
                DataTable dt = GBDataProvider.GetUser(parms);
                j.Data = dt;
            }
            catch (Exception e)
            {
                j.Status  = 0;
                j.Message = e.Message;
            }
            return(j);
        }