public static int Update(MediaModel param) { int ret = 0; MediaModel cmedia = new MediaModel(); MediaTax mt = new MediaTax(); try { if (cmedia.model_Update(param)) { mt.model_DeleteMediaTaxAllbyMID(param.MID); if (param.MediaTax.Length > 0) { foreach (MediaTax i in param.MediaTax) { ret += mt.model_InsertTax(i); } } } ret = 1; } catch (Exception ex) { string ss = ex.Message + ex.StackTrace; } return(ret); }
public static int Update(MediaModel param) { int ret = 0; MediaModel cmedia = new MediaModel(); MediaTax mt = new MediaTax(); try { if (cmedia.model_Update(param)) { mt.model_DeleteMediaTaxAllbyMID(param.MID); if (param.MediaTax.Length > 0) { foreach (MediaTax i in param.MediaTax) { ret += mt.model_InsertTax(i); } } } ret = 1; } catch { } return(ret); }
public static int InsertMediaTax(List <MediaTax> param) { MediaTax mt = new MediaTax(); int ret = 0; try { foreach (MediaTax m in param) { ret += mt.model_InsertTax(m); } ret = 1; } catch { } return(ret); }