/// <summary> /// update title if we have a titleid /// </summary> /// <param name="titleid"></param> protected void update_title(Int32 titleid, string newtitle) { PublishipAdvanceTitleTable _t = new PublishipAdvanceTitleTable(titleid); _t.Title = newtitle; _t.Save(); //PublishipAdvanceTitleTableCollection _t = new PublishipAdvanceTitleTableCollection().Where("PATitleID", SubSonic.Comparison.Equals, titleid).Load(); //_t[0].Title = newtitle; //_t[0].Save(); }
//end update order /// <summary> /// append new title to db /// </summary> /// <param name="orderid">int32</param> /// <param name="newtitle">string</param> /// <returns>new record id of title</returns> protected Int32 append_title(Int32 orderid, string newtitle) { Int32 _newid = 0; if (!string.IsNullOrEmpty(newtitle)) { //append title with new id PublishipAdvanceTitleTable _t = new PublishipAdvanceTitleTable(); _t.PAOrderID = orderid; _t.Title = newtitle; _t.Save(); //get new id _newid = (Int32)_t.GetPrimaryKeyValue(); } return(_newid); }
/// <summary> /// update title if we have a titleid /// </summary> /// <param name="titleid"></param> protected void update_title(Int32 titleid, string newtitle) { PublishipAdvanceTitleTable _t = new PublishipAdvanceTitleTable(titleid); _t.Title = newtitle; _t.Save(); //PublishipAdvanceTitleTableCollection _t = new PublishipAdvanceTitleTableCollection().Where("PATitleID", SubSonic.Comparison.Equals, titleid).Load(); //_t[0].Title = newtitle; //_t[0].Save(); }
//end update order /// <summary> /// append new title to db /// </summary> /// <param name="orderid">int32</param> /// <param name="newtitle">string</param> /// <returns>new record id of title</returns> protected Int32 append_title(Int32 orderid, string newtitle) { Int32 _newid = 0; if (!string.IsNullOrEmpty(newtitle)) { //append title with new id PublishipAdvanceTitleTable _t = new PublishipAdvanceTitleTable(); _t.PAOrderID = orderid; _t.Title = newtitle; _t.Save(); //get new id _newid = (Int32)_t.GetPrimaryKeyValue(); } return _newid; }
public void Insert(int PAOrderID,string Title,byte[] Ts) { PublishipAdvanceTitleTable item = new PublishipAdvanceTitleTable(); item.PAOrderID = PAOrderID; item.Title = Title; item.Ts = Ts; item.Save(UserName); }
public void Update(int PATitleID,int PAOrderID,string Title,byte[] Ts) { PublishipAdvanceTitleTable item = new PublishipAdvanceTitleTable(); item.MarkOld(); item.IsLoaded = true; item.PATitleID = PATitleID; item.PAOrderID = PAOrderID; item.Title = Title; item.Ts = Ts; item.Save(UserName); }