Beispiel #1
0
 public object AddSpecialRequest(LabelPrintSpecialRequestModel model)
 {
     return(SqlHelper.ExecuteScalar(@" insert into  SJPrintCustLabelSpecialRequest(OrgID,Label,RequestSeq,RequestName,RequestValue,IdentityType,IdentityTypeDesc) 
                                       values(@OrgID,@Label,@RequestSeq,@RequestName,@RequestValue,@IdentityType,@IdentityTypeDesc); 
                                         SELECT @@IDENTITY AS R;"
                                    , new SqlParameter[] {
         new SqlParameter("@OrgID", model.OrgID),
         new SqlParameter("@Label", model.Label),
         new SqlParameter("@RequestSeq", model.RequestSeq),
         new SqlParameter("@RequestName", model.RequestName),
         new SqlParameter("@RequestValue", SqlHelper.ConvertNullableStringToDbValue(model.RequestValue)),
         new SqlParameter("@IdentityType", model.IdentityType),
         new SqlParameter("@IdentityTypeDesc", model.IdentityTypeDesc),
         //new SqlParameter("@IsFixedValue", model.IsFixedValue)
     }));
 }
Beispiel #2
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)
     }));
 }
Beispiel #3
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)
     }));
 }
Beispiel #4
0
 public int UpdateLabelPrintSpecialRequestModel(int id, string value, string label)
 {
     return(SqlHelper.ExecuteNonQuery(" update SJPrintCustLabelSpecialRequest  set RequestValue=@RequestValue,Label=@Label where id=@id ;"
                                      , new SqlParameter[] { new SqlParameter("@id", id),
                                                             new SqlParameter("@RequestValue", SqlHelper.ConvertNullableStringToDbValue(value)),
                                                             new SqlParameter("@Label", SqlHelper.ConvertNullableStringToDbValue(label)) }));
 }