public int EditByID(ref string ReturnDescription) { if (ID < 0) { throw new Exception("CardPassword 尚未初始化到具体的数据实例上,请先使用 GetInformation 等获取数据信息"); } DataTable dt = new SLS.Dal.Tables.T_CardPasswordAgents().Open(PF.ConnectString, "", "[ID] = " + ID, ""); if ((dt == null) || (dt.Rows.Count < 1)) { ReturnDescription = "数据库读写错误"; return(-1); } SLS.Dal.Tables.T_CardPasswordAgents t_CardPasswordAgents = new SLS.Dal.Tables.T_CardPasswordAgents(); t_CardPasswordAgents.Company.Value = Company; t_CardPasswordAgents.Password.Value = Password; t_CardPasswordAgents.Name.Value = Name; t_CardPasswordAgents.State.Value = State; t_CardPasswordAgents.Url.Value = Url; t_CardPasswordAgents.Update(PF.ConnectString, "[ID] = " + ID.ToString()); return(0); }
public int EditByID(ref string ReturnDescription) { if (ID < 0) { throw new Exception("CardPassword 尚未初始化到具体的数据实例上,请先使用 GetInformation 等获取数据信息"); } DataTable dt = new SLS.Dal.Tables.T_CardPasswordAgents().Open(PF.ConnectString,"", "[ID] = " + ID, ""); if ((dt == null) || (dt.Rows.Count < 1)) { ReturnDescription = "数据库读写错误"; return -1; } SLS.Dal.Tables.T_CardPasswordAgents t_CardPasswordAgents = new SLS.Dal.Tables.T_CardPasswordAgents(); t_CardPasswordAgents.Company.Value = Company; t_CardPasswordAgents.Password.Value = Password; t_CardPasswordAgents.Name.Value = Name; t_CardPasswordAgents.State.Value = State; t_CardPasswordAgents.Url.Value = Url; t_CardPasswordAgents.Update(PF.ConnectString,"[ID] = " + ID.ToString()); return 0; }