public SingleResponeMessage <CapitalInfo> Get(int id) { SingleResponeMessage <CapitalInfo> ret = new SingleResponeMessage <CapitalInfo>(); ret.item = CapitalServices.GetInstance().getCapitalbyId(id); ret.isSuccess = true; return(ret); }
public ListResponeMessage <CapitalInfo> GetByName(string name) { ListResponeMessage <CapitalInfo> ret = new ListResponeMessage <CapitalInfo>(); ret.data = CapitalServices.GetInstance().GetByName(name); ret.isSuccess = true; return(ret); }
public ListResponeMessage <CapitalInfo> GetAll() { ListResponeMessage <CapitalInfo> ret = new ListResponeMessage <CapitalInfo>(); ret.data = CapitalServices.GetInstance().getAllCapital(); ret.isSuccess = true; return(ret); }
public ActionMessage Post([FromBody] CapitalInfo _capital) { ActionMessage ret = new ActionMessage(); try { ret = CapitalServices.GetInstance().createCapital(_capital); } catch (Exception ex) { ret.isSuccess = false; ret.err.msgCode = "001"; ret.err.msgString = ex.ToString(); } return(ret); }
public ActionMessage Delete(int id) { ActionMessage ret = new ActionMessage(); try { CapitalServices.GetInstance().deleteCapital(id); ret.isSuccess = true; } catch (Exception ex) { ret.isSuccess = false; ret.err.msgCode = "001"; ret.err.msgString = ex.ToString(); } return(ret); }
public ActionMessage Put(int id, [FromBody] CapitalInfo _capital) { ActionMessage ret = new ActionMessage(); try { CapitalServices.GetInstance().editEmloyee(id, _capital); ret.isSuccess = true; } catch (Exception ex) { ret.isSuccess = false; ret.err.msgCode = "001"; ret.err.msgString = ex.ToString(); } return(ret); }