public object AddCommonAdjustment(LabelPrintCommonAdjustmentModel model) { return(SqlHelper.ExecuteScalar(@" INSERT INTO dbo.SJPrintCustLabelCommonAdjustment(OrgID,Label,ProductionName,ExpirationMonth,ExpirationDay,IdentityType,IdentityTypeDesc,NetWeight) VALUES( @OrgID,@Label,@ProductionName,@ExpirationMonth,@ExpirationDay,@IdentityType,@IdentityTypeDesc,@NetWeight ); SELECT @@IDENTITY AS R" , new SqlParameter[] { new SqlParameter("@OrgID", model.OrgID), new SqlParameter("@Label", model.Label), new SqlParameter("@ProductionName", SqlHelper.ConvertNullableStringToDbValue(model.ProductionName)), new SqlParameter("@ExpirationMonth", SqlHelper.ConvertNullableIntToDbValue(model.ExpirationMonth)), new SqlParameter("@ExpirationDay", SqlHelper.ConvertNullableIntToDbValue(model.ExpirationDay)), new SqlParameter("@IdentityType", model.IdentityType), new SqlParameter("@IdentityTypeDesc", model.IdentityTypeDesc), new SqlParameter("@NetWeight", model.NetWeight) })); }
public int UpdateCommonAdjustment(LabelPrintCommonAdjustmentModel model) { return(SqlHelper.ExecuteNonQuery(@" Update dbo.SJPrintCustLabelCommonAdjustment " + " SET OrgID=@OrgID, " + " Label=@Label, " + " ProductionName =@ProductionName, " + " ExpirationMonth =@ExpirationMonth, " + " ExpirationDay =@ExpirationDay, " + " IdentityType =@IdentityType, " + " IdentityTypeDesc =@IdentityTypeDesc ," + " NetWeight =@NetWeight " + " WHERE ID=@ID" , new SqlParameter[] { new SqlParameter("@ID", model.ID), new SqlParameter("@OrgID", model.OrgID), new SqlParameter("@Label", model.Label), new SqlParameter("@ProductionName", SqlHelper.ConvertNullableStringToDbValue(model.ProductionName)), new SqlParameter("@ExpirationMonth", SqlHelper.ConvertNullableIntToDbValue(model.ExpirationMonth)), new SqlParameter("@ExpirationDay", SqlHelper.ConvertNullableIntToDbValue(model.ExpirationDay)), new SqlParameter("@IdentityType", model.IdentityType), new SqlParameter("@IdentityTypeDesc", model.IdentityTypeDesc), new SqlParameter("@NetWeight", model.NetWeight) })); }
public int UpdateCommonAdjustment(LabelPrintCommonAdjustmentModel model) { return(dal.UpdateCommonAdjustment(model)); }
public int AddCommonAdjustment(LabelPrintCommonAdjustmentModel model) { return(Convert.ToInt32(dal.AddCommonAdjustment(model))); }