protected override string GetFilterSql(BILBasic.User.UserModel user, T_SupplierInfo model) { string strSql = " where isnull(isDel,0) != 2 "; if (model.SupplierNo != null && model.SupplierNo != "") { strSql += " and ( SupplierNo Like '%" + model.SupplierNo + "%' or SupplierName Like '%" + model.SupplierNo + "%' ) "; } if (model.ContactPerson != null && model.ContactPerson != "") { strSql += " and ContactPerson like '%" + model.ContactPerson + "%' "; } if (model.ContactTel != null && model.ContactTel != "") { strSql += " and ContactTel like '%" + model.ContactTel + "%' "; } if (model.SupplierName != null && model.SupplierName != "") { strSql += " and SupplierName like '%" + model.SupplierName + "%' "; } return(strSql); }
protected override string GetFilterSql(BILBasic.User.UserModel user, T_PickRuleInfo model) { string strSql = base.GetFilterSql(user, model); string strAnd = " and "; if (!string.IsNullOrEmpty(model.MaterialClassName)) { strSql += strAnd; strSql += " (MaterialClassCode Like '" + model.MaterialClassName + "%' or MaterialClassName Like '" + model.MaterialClassName + "%' )"; } if (!string.IsNullOrEmpty(model.PickRuleName)) { strSql += strAnd; strSql += " (PickRuleCode Like '" + model.PickRuleCode + "%' or PickRuleName Like '" + model.PickRuleName + "%' )"; } if (model.RuleType > 0) { strSql += strAnd; strSql += " RuleType = '" + model.RuleType + "'"; } return(strSql); }
protected override List <string> GetDeleteSql(BILBasic.User.UserModel user, T_PickRuleInfo model) { List <string> lstSql = new List <string>(); string strSql = string.Empty; strSql = "delete t_pickrule where id = '" + model.ID + "'"; lstSql.Add(strSql); return(lstSql); }
protected override List <string> GetSaveSql(BILBasic.User.UserModel user, ref T_PickRuleInfo model) { string strSql = string.Empty; List <string> lstSql = new List <string>(); int voucherID = 0; //更新 if (model.ID > 0) { strSql = "update t_Pickrule a set a.Materialclasscode = '" + model.MaterialClassCode + "',a.Materialclassname = '" + model.MaterialClassName + "'," + "a.Pickrulecode='" + model.PickRuleCode + "',a.Pickrulename='" + model.PickRuleName + "',a.Note='" + model.Note + "',a.Modifyer = '" + user.UserNo + "' ,a.Modifytime = getdate,a.status = '" + model.Status + "'" + "where id = '" + model.ID + "'"; lstSql.Add(strSql); } else //插入 { if (DbFactory.DbFactoryType.SQLSERVER == 0) { voucherID = base.GetTableIDBySqlServer(GetTableName()); model.ID = voucherID; } else { voucherID = base.GetTableID("SEQ_INSTOCK_ID"); model.ID = voucherID.ToInt32(); } //int voucherID = base.GetTableID("Seq_Pickrule_Id"); //model.ID = voucherID; strSql = "SET IDENTITY_INSERT t_Pickrule ON;insert into t_Pickrule(Id, Materialclasscode, Materialclassname, Pickrulecode, Pickrulename, Createtime, Creater, Isdel, Status, Note,RuleType)" + " values('" + voucherID + "','" + model.MaterialClassCode + "','" + model.MaterialClassName + "','" + model.PickRuleCode + "','" + model.PickRuleName + "'," + " getdate(),'" + user.UserNo + "','1','" + model.Status + "','" + model.Note + "','" + model.RuleType + "') SET IDENTITY_INSERT t_Pickrule off"; lstSql.Add(strSql); } return(lstSql); }
protected override List <string> GetSaveSql(BILBasic.User.UserModel user, ref T_SupplierInfo model) { throw new System.NotImplementedException(); }
public bool SaveModelToDB(BILBasic.User.UserModel userInfo, ref T_MaterialInfo model, ref string strMsg) { throw new NotImplementedException(); }
public bool DeleteModelByModelSql(BILBasic.User.UserModel userInfo, T_MaterialInfo model, ref string strMsg) { throw new NotImplementedException(); }
public bool GetModelListByPage(ref List <T_MaterialInfo> gmodelList, BILBasic.User.UserModel userInfo, T_MaterialInfo model, ref BILBasic.Common.DividPage page, ref string strMsg) { throw new NotImplementedException(); }
protected override List <string> GetSaveSql(BILBasic.User.UserModel user, ref T_MaterialDoc_Info model) { throw new NotImplementedException(); }