Exemplo n.º 1
0
        //public int AddCheckListDescription(int checkListPk, string desc)
        //{
        //    var proxy = new ServiceReferenceCheckList.CheckListClient();
        //    string errorMsg;
        //    bool isCompleted;
        //    int resultCheckListDescPk;
        //    var count = proxy.InsertCheckListDescription(0, checkListPk, desc, out errorMsg, out isCompleted, out resultCheckListDescPk);
        //    if (resultCheckListDescPk <= 0)
        //        return 0;

        //    return resultCheckListDescPk;
        //}

        //public int UpdateCheckListDescription(int checkListPk, int checkListDescPk, string desc)
        //{
        //    var proxy = new ServiceReferenceCheckList.CheckListClient();
        //    string errorMsg;
        //    bool isCompleted;
        //    int resultCheckListDescPk;
        //    var count = proxy.UpdateCheckListDescription(checkListDescPk, checkListPk, desc, out errorMsg, out isCompleted, out resultCheckListDescPk);
        //    if (resultCheckListDescPk <= 0)
        //        return 0;

        //    return resultCheckListDescPk;
        //}

        public IList <RequestVM> GetRequestList(int checkListPk, string reqType)
        {
            var proxy  = new ServiceReferenceCheckList.CheckListClient();
            var items  = proxy.GetRequestListBy(checkListPk, reqType);
            var result = new List <RequestVM>();

            foreach (var x in items)
            {
                var item = new RequestVM();
                Helper.CopyProperties(x, item);
                result.Add(item);
            }
            return(result);
        }