Exemplo n.º 1
0
 public DataTable GetReportSalesEmployee(DateTime FromDate, DateTime ToDate)
 {
     var objects = new Dictionary<string, DateTime>();
     objects.Add("FromDate", FromDate);
     objects.Add("ToDate", ToDate);
     ServiceResult<List<ReportSalesEmployee>> list = CloudServiceFactory< List<ReportSalesEmployee>>.ExecuteFunction("Report/getReportSalesEmployee", objects, HeaderParameter, "POST");
     if (list.Success && list.Data != null)
         return CommonFunction.ConvertToDataTable(list.Data);
     else return null;
 }
Exemplo n.º 2
0
        public DataTable Get()
        {
            ServiceResult <List <Customer> > list = CloudServiceFactory <List <Customer> > .ExecuteFunction("Customer/getlist", null, HeaderParameter, "GET");

            if (list.Success && list.Data != null)
            {
                return(CommonFunction.ConvertToDataTable(list.Data));
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 3
0
        public DataTable Get()
        {
            ServiceResult <List <InventoryItemCategory> > list = CloudServiceFactory <List <InventoryItemCategory> > .ExecuteFunction("InventoryItemCategory/GetList", null, HeaderParameter, "GET");

            if (list.Success && list.Data != null)
            {
                return(CommonFunction.ConvertToDataTable(list.Data));
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 4
0
        public int Delete(Guid id)
        {
            ServiceResult result = CloudServiceFactory.ExecuteFunction("Customer/Delete", id.ToString(), HeaderParameter);

            if (result.Success == false)
            {
                if (result.ErrorCode == ErrorCode.ItemWasUsed)
                {
                    return(2);
                }
                return(0);
            }
            return(1);
        }
Exemplo n.º 5
0
        public int InsertUpdate(DictionaryDataSet.CustomerRow drObjectChange)
        {
            ServiceResult result = CloudServiceFactory.ExecuteFunction("Customer/InsertUpdate", CommonFunction.GetItem <Customer>(drObjectChange), HeaderParameter);

            if (result.Success == false)
            {
                if (result.ErrorCode == ErrorCode.DuplicateCode)
                {
                    return(2);
                }
                return(0);
            }
            return(1);
        }
Exemplo n.º 6
0
        public int InsertUpdate(DictionaryDataSet.AreaRow drObjectChange, Guid oldID)
        {
            ServiceResult result = CloudServiceFactory.ExecuteFunction("Area/InsertUpdate", new InsertUpdateParameter <Area>(oldID, CommonFunction.GetItem <Area>(drObjectChange)), HeaderParameter);

            if (result.Success == false)
            {
                if (result.ErrorCode == ErrorCode.DuplicateCode)
                {
                    return(2);
                }
                return(0);
            }
            return(1);
        }
Exemplo n.º 7
0
        public bool CheckBeforeDelete(Guid id)
        {
            ServiceResult result = CloudServiceFactory.ExecuteFunction("Customer/checkbeforedelete", id.ToString(), HeaderParameter);

            return(result.Success);
        }
Exemplo n.º 8
0
        public bool CheckCodeExists(DictionaryDataSet.CustomerRow drObjectChange)
        {
            ServiceResult result = CloudServiceFactory.ExecuteFunction("Customer/CheckCodeExists", CommonFunction.GetItem <Customer>(drObjectChange), HeaderParameter);

            return(result.Success);
        }
Exemplo n.º 9
0
        public bool CheckBeforeDelete(Guid id)
        {
            ServiceResult result = CloudServiceFactory.ExecuteFunction("InventoryItemCategory/CheckBeforeDelete", id.ToString(), HeaderParameter);

            return(result.Success);
        }
Exemplo n.º 10
0
        public bool CheckCodeExists(DictionaryDataSet.InventoryItemCategoryRow drObjectChange)
        {
            ServiceResult result = CloudServiceFactory.ExecuteFunction("InventoryItemCategory/CheckCodeExists", CommonFunction.GetItem <InventoryItemCategory>(drObjectChange), HeaderParameter);

            return(result.Success);
        }