public string Get() { List <Email> emails = SQLcmdEmail.SQLcmdData(); String hingeString = Newtonsoft.Json.JsonConvert.SerializeObject(emails); return(hingeString); }
public int Updatepost() { int Id = int.Parse(Request.Form["EID"]); string Name = Request.Form["EmailName"].ToString(); string UpdateTime = DateTime.Now.ToString(); return(SQLcmdEmail.SQLUpdateData(Name, Id, UpdateTime)); }
public int Insertpost() { string Name = Request.Form["EmailName"].ToString(); string CreateTime = DateTime.Now.ToString(); int EDelete = 1; string UpdateTime = "No modification"; return(SQLcmdEmail.SQLinsertData(Name, CreateTime, EDelete, UpdateTime)); }
public int Deletepost() { int ID = int.Parse(Request.Form["EID"]); return(SQLcmdEmail.SQLDeleteData(ID)); }