コード例 #1
0
 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)
     }));
 }
コード例 #2
0
 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)
     }));
 }
コード例 #3
0
 public int UpdateCommonAdjustment(LabelPrintCommonAdjustmentModel model)
 {
     return(dal.UpdateCommonAdjustment(model));
 }
コード例 #4
0
 public int AddCommonAdjustment(LabelPrintCommonAdjustmentModel model)
 {
     return(Convert.ToInt32(dal.AddCommonAdjustment(model)));
 }