Exemplo n.º 1
0
        public void Edit(dynamic data)
        {
            var formWrapper = RequestWrapper.Instance().SetXml(@"
<settings>
    <table>
        mms_deal
    </table>
    <where>
        <c column='BillNo' symbol='equal'></c>
    </where>
</settings>");

            var tabsWrapper = new List <RequestWrapper>();

            tabsWrapper.Add(RequestWrapper.Instance().SetXml(@"
<settings>
    <table>mms_deal</table>
    <where>
        <c column='BillNo' symbol='equal'></c>
    </where>
</settings>"));
            tabsWrapper.Add(RequestWrapper.Instance().SetXml(@"
<settings>
    <table>mms_dealDetail</table>
    <where>
        <c column='BillNo' symbol='equal'></c>      
        <c column='RowId' symbol='equal'></c>      
    </where>
</settings>"));

            var service = new mms_dealService();
            var result  = service.EditPage(data, formWrapper, tabsWrapper);
        }
Exemplo n.º 2
0
        public void Edit(dynamic data)
        {
            var listWrapper = RequestWrapper.Instance().LoadSettingXmlString(@"
<settings>
    <table>
        mms_deal
    </table>
    <where>
        <field name='BillNo' cp='equal'></field>
    </where>
</settings>");
            var service     = new mms_dealService();
            var result      = service.Edit(null, listWrapper, data);
        }
Exemplo n.º 3
0
        public void Audit(string id, JObject data)
        {
            var pUpdate = ParamUpdate.Instance()
                          .Update("mms_deal")
                          .Column("ApproveState", data["status"])
                          .Column("ApproveRemark", data["comment"])
                          .Column("ApprovePerson", FormsAuth.GetLoginer().UserName)
                          .Column("ApproveDate", DateTime.Now)
                          .Where("BillNo", id);

            var service      = new mms_dealService();
            var rowsAffected = service.Update(pUpdate);

            MvcHelper.ThrowHttpExceptionWhen(rowsAffected < 0, "单据审核失败[BillNo={0}],请重试或联系管理员!", id);
        }
Exemplo n.º 4
0
        public dynamic GetPageData(string id)
        {
            var masterService = new mms_dealService();
            var pQuery = ParamQuery.Instance().Where("BillNo", id);

             var result = new {
                //主表数据
                form = masterService.GetModel(pQuery),
                scrollKeys = masterService.ScrollKeys("BillNo", id),

                //明细数据
                tab0 = new mms_dealService().GetModel(pQuery),      
                tab1 = new mms_dealDetailService().GetDynamicList(pQuery)
            };
            return result;
        }
Exemplo n.º 5
0
        public dynamic GetPageData(string id)
        {
            var masterService = new mms_dealService();
            var pQuery        = ParamQuery.Instance().Where("BillNo", id);

            var result = new {
                //主表数据
                form       = masterService.GetModel(pQuery),
                scrollKeys = masterService.ScrollKeys("BillNo", id),

                //明细数据
                tab0 = new mms_dealService().GetModel(pQuery),
                tab1 = new mms_dealDetailService().GetDynamicList(pQuery)
            };

            return(result);
        }
Exemplo n.º 6
0
        public dynamic Get(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
<settings defaultOrderBy='BillNo'>
    <select>*</select>
    <from>mms_deal</from>
    <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true' >
        <field name='ProjectCode'		cp='like'></field>   
        <field name='ApplyDate'		cp='daterange'></field>   
        <field name='DealType'		cp='equal'></field>   
        <field name='DealKind'		cp='equal'></field>   
        <field name='TotalMoney'		cp='equal'></field>   
        <field name='ApproveState'		cp='equal'></field>   
    </where>
</settings>");
            var service = new mms_dealService();
            var pQuery = query.ToParamQuery();
            var result = service.GetDynamicListWithPaging(pQuery);
            return result;
        }
Exemplo n.º 7
0
        public dynamic Get(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
<settings defaultOrderBy='BillNo'>
    <select>*</select>
    <from>mms_deal</from>
    <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true' >
        <field name='ProjectCode'		cp='like'></field>   
        <field name='ApplyDate'		cp='daterange'></field>   
        <field name='DealType'		cp='equal'></field>   
        <field name='DealKind'		cp='equal'></field>   
        <field name='TotalMoney'		cp='equal'></field>   
        <field name='ApproveState'		cp='equal'></field>   
    </where>
</settings>");
            var service = new mms_dealService();
            var pQuery  = query.ToParamQuery();
            var result  = service.GetDynamicListWithPaging(pQuery);

            return(result);
        }
Exemplo n.º 8
0
        public void Audit(string id, JObject data)
        {
            var pUpdate = ParamUpdate.Instance()
                .Update("mms_deal")
                .Column("ApproveState", data["status"])
                .Column("ApproveRemark", data["comment"])
                .Column("ApprovePerson", FormsAuth.GetLoginer().UserName)
                .Column("ApproveDate", DateTime.Now)
                .Where("BillNo", id);

            var service = new mms_dealService();
            var rowsAffected = service.Update(pUpdate);
            MvcHelper.ThrowHttpExceptionWhen(rowsAffected < 0, "单据审核失败[BillNo={0}],请重试或联系管理员!", id);
        }
Exemplo n.º 9
0
        public void Edit(dynamic data)
        {
            var formWrapper = RequestWrapper.Instance().SetXml(@"
<settings>
    <table>
        mms_deal
    </table>
    <where>
        <c column='BillNo' symbol='equal'></c>
    </where>
</settings>");

            var tabsWrapper = new List<RequestWrapper>();
            tabsWrapper.Add(RequestWrapper.Instance().SetXml(@"
<settings>
    <table>mms_deal</table>
    <where>
        <c column='BillNo' symbol='equal'></c>
    </where>
</settings>"));
            tabsWrapper.Add(RequestWrapper.Instance().SetXml(@"
<settings>
    <table>mms_dealDetail</table>
    <where>
        <c column='BillNo' symbol='equal'></c>      
        <c column='RowId' symbol='equal'></c>      
    </where>
</settings>"));
             
            var service = new mms_dealService();
            var result = service.EditPage(data, formWrapper, tabsWrapper);
        }
Exemplo n.º 10
0
        public void Edit(dynamic data)
        {
            var listWrapper = RequestWrapper.Instance().LoadSettingXmlString(@"
<settings>
    <table>
        mms_deal
    </table>
    <where>
        <field name='BillNo' cp='equal'></field>
    </where>
</settings>");
            var service = new mms_dealService();
            var result = service.Edit(null, listWrapper, data);
        }