public List <MenuEntity> SelectMenuEntity() { string sqlstr = "select * from dbo.Menu"; DataSet ds = SqlDataHelper.ExecuteDataSet(SqlDataHelper.GetConnection(), CommandType.Text, sqlstr); return(DsToMenuList(ds)); }
public List <StorageWayEntity> SelectAllStorageWayEntity() { string sqlstr = "select * from dbo.StorageWay"; DataSet ds = SqlDataHelper.ExecuteDataSet(SqlDataHelper.GetConnection(), CommandType.Text, sqlstr); return(DsToStorageWayEntityList(ds)); }
public FeedbackInfomation AddStocktakingBill(StockModel sb) { FeedbackInfomation fi = new FeedbackInfomation(); try { using (SqlConnection conn = SqlDataHelper.GetConnection()) { conn.Open(); SqlTransaction st = conn.BeginTransaction(); sb.Status = BaseInfo.FindBillStatusIDByName("未盘点"); long id = MySMDAL.InsertStocktakingBill(sb, st); sb.StocktakingID = id; bool ret = MySMDAL.GenerateStocktakingDetailInfo(sb, BaseInfo.FindBillStatusIDByName("未盘点"), st); sb = MySMDAL.SelectStocktakingBill(sb.CmstID, sb.StocktakingID, st); st.Commit(); } fi.FeedbackMessage = Tips.SAVE_SUCCESS; fi.ErrorStatus = STATUS_ADAPTER.SAVE_SUCCESS; fi.Result = sb; return(fi); } catch (Exception ex) { fi.FeedbackMessage = ex.Message.ToString(); fi.ErrorStatus = STATUS_ADAPTER.SAVE_FAILED; fi.Result = null; return(fi); } }
public DataSet SelectStocktakingDetails(long stocktakingId) { string sqlstr = $" select * from Operator where Ope_id = {stocktakingId} "; DataSet ds = SqlDataHelper.ExecuteDataSet(SqlDataHelper.GetConnection(), CommandType.Text, sqlstr); return(ds); }
public List <RateTypeEntity> SelectAllRateTypeEntity() { string sqlstr = "select * from dbo.RateType"; DataSet ds = SqlDataHelper.ExecuteDataSet(SqlDataHelper.GetConnection(), CommandType.Text, sqlstr); return(DsToRateTypeEntityList(ds)); }
public List <Subject> SelectAllSubjectEntityList() { string sqlstr = "select * from Subject "; DataSet ds = SqlDataHelper.ExecuteDataSet(SqlDataHelper.GetConnection(), CommandType.Text, sqlstr); return(DsToSubjectEntityList(ds)); }
public List <BillType> SelectAllBillTypeEntity() { string sqlstr = "select * from BillType "; DataSet ds = SqlDataHelper.ExecuteDataSet(SqlDataHelper.GetConnection(), CommandType.Text, sqlstr); return(DsToBillTypeEntity(ds)); }
public List <SkuAuxType> SelectSkuAuxTypeEntityList() { string sqlstr = "select * from SkuAuxType "; DataSet ds = SqlDataHelper.ExecuteDataSet(SqlDataHelper.GetConnection(), CommandType.Text, sqlstr); return(DsToSignTypeEntityList(ds)); }
public List <OrganizationEntity> SelectAllOrganizationEntity() { string sqlstr = "SELECT con.Cmst_ID,con.Cmst_Name,con.Cmst_IfUse,op.Ope_Account from dbo.CmstOrganization AS con LEFT JOIN Operator AS op ON con.Cmst_ID = op.Ope_Cmst_ID WHERE op.Ope_IfSysAccount = 1"; DataSet ds = SqlDataHelper.ExecuteDataSet(SqlDataHelper.GetConnection(), CommandType.Text, sqlstr); return(DsToOrganizationEntityList(ds)); }
public List <DepotsPropertyEntity> SelectAllDepotsPropertyEntity() { string sqlstr = "select * from dbo.DepotsProperty"; DataSet ds = SqlDataHelper.ExecuteDataSet(SqlDataHelper.GetConnection(), CommandType.Text, sqlstr); return(DsToDepotsPropertyEntityList(ds)); }
public FeedbackInfomation CheckStocktakingDetail(long stocktakingId, long stocktakingDetailId, int result, int checker, string remark) { FeedbackInfomation fi = new FeedbackInfomation(); try { using (SqlConnection conn = SqlDataHelper.GetConnection()) { conn.Open(); SqlTransaction st = conn.BeginTransaction(); CheckDetail(stocktakingId, stocktakingDetailId, result, checker, remark, st); StocktakingBillDetail sbd = MySMDAL.SelectStocktakingBillDetail(stocktakingDetailId, st); st.Commit(); fi.Result = sbd; fi.FeedbackMessage = Tips.CHECK_SUCCESS; fi.ErrorStatus = STATUS_ADAPTER.CHECK_SUCCESS; return(fi); } } catch (Exception ex) { fi.Result = null; fi.ErrorStatus = STATUS_ADAPTER.CHECK_FAILED; fi.FeedbackMessage = Tips.CHECK_SUCCESS + ":" + ex.Message.ToString(); return(fi); } }
public int InsertRateType(RateTypeEntity rte) { StringBuilder sb = new StringBuilder("insert into RateType(Rty_Name,Rty_Remark,Rty_IfUse) values("); sb.AppendFormat(" '{0}',", rte.RtyName); sb.AppendFormat(" '{0}',", rte.RtyRemark); sb.AppendFormat(" '{0}')", rte.RtyIfUse == true ? 1 : 0); return(SqlDataHelper.ExecuteNonQuery(SqlDataHelper.GetConnection(), CommandType.Text, sb.ToString())); }
public MenuEntity SelectMenuEntity(int menuID) { string sqlstr = "select * from dbo.Menu where Meu_ID={0}"; sqlstr = string.Format(sqlstr, menuID); DataSet ds = SqlDataHelper.ExecuteDataSet(SqlDataHelper.GetConnection(), CommandType.Text, sqlstr); return(DsToMenuEntity(ds)); }
public int UpdateRateType(RateTypeEntity rte) { StringBuilder sb = new StringBuilder("update dbo.RateType set"); sb.AppendFormat(" Rty_Remark='{0}', ", rte.RtyRemark); sb.AppendFormat(" Rty_IfUse={0} ", rte.RtyIfUse == true ? 1 : 0); sb.AppendFormat(" where Rty_Id={0}", rte.RtyId); return(SqlDataHelper.ExecuteNonQuery(SqlDataHelper.GetConnection(), CommandType.Text, sb.ToString())); }
public int UpdateMeasureWay(MeasureWayEntity me) { StringBuilder sb = new StringBuilder("update dbo.MeasureWay set"); sb.AppendFormat(" Mwa_Remark='{0}', ", me.MwaRemark); sb.AppendFormat(" Mwa_IfUse={0} ", me.MwaIfUse == true ? 1 : 0); sb.AppendFormat(" where Mwa_Id={0}", me.MwaId); return(SqlDataHelper.ExecuteNonQuery(SqlDataHelper.GetConnection(), CommandType.Text, sb.ToString())); }
public OperationEntity SelectOperationEntity(int operationID) { string sqlstr = "select * from dbo.Operation where Ope_ID={0}"; sqlstr = string.Format(sqlstr, operationID); DataSet ds = SqlDataHelper.ExecuteDataSet(SqlDataHelper.GetConnection(), CommandType.Text, sqlstr); return(DsToOperationEntity(ds)); }
public int UpdateDepotsProperty(DepotsPropertyEntity de) { StringBuilder sb = new StringBuilder("update dbo.DepotsProperty set"); sb.AppendFormat(" Dpr_Remark='{0}', ", de.DprRemark); sb.AppendFormat(" Dpr_IfUse={0} ", de.DprIfUse == true ? 1 : 0); sb.AppendFormat(" where Dpr_Id={0}", de.DprId); return(SqlDataHelper.ExecuteNonQuery(SqlDataHelper.GetConnection(), CommandType.Text, sb.ToString())); }
public OrganizationEntity SelectOrganizationByID(int cmstID) { string sqlstr = "select * from dbo.CmstOrganization where Cmst_ID={0}"; sqlstr = string.Format(sqlstr, cmstID); DataSet ds = SqlDataHelper.ExecuteDataSet(SqlDataHelper.GetConnection(), CommandType.Text, sqlstr); return(DsToOrganizationEntity(ds)); }
public DataSet SelectOrganizationByCmstName(string cmstName) { string sqlstr = "select * from dbo.CmstOrganization where Cmst_Name='{0}'"; sqlstr = string.Format(sqlstr, cmstName); DataSet ds = SqlDataHelper.ExecuteDataSet(SqlDataHelper.GetConnection(), CommandType.Text, sqlstr); return(ds); }
public int InsertMeasureWay(MeasureWayEntity me) { StringBuilder sb = new StringBuilder("insert into MeasureWay(Mwa_Name,Mwa_Remark,Mwa_IfUse) values("); sb.AppendFormat(" '{0}',", me.MwaName); sb.AppendFormat(" '{0}',", me.MwaRemark); sb.AppendFormat(" '{0}')", me.MwaIfUse == true ? 1 : 0); return(SqlDataHelper.ExecuteNonQuery(SqlDataHelper.GetConnection(), CommandType.Text, sb.ToString())); }
public int InsertDepotsProperty(DepotsPropertyEntity de) { StringBuilder sb = new StringBuilder("insert into DepotsProperty(Dpr_Name,Dpr_Remark,Dpr_IfUse) values("); sb.AppendFormat(" '{0}',", de.DprName); sb.AppendFormat(" '{0}',", de.DprRemark); sb.AppendFormat(" '{0}')", de.DprIfUse == true ? 1 : 0); return(SqlDataHelper.ExecuteNonQuery(SqlDataHelper.GetConnection(), CommandType.Text, sb.ToString())); }
public bool CheckedOperatorAccountRepeate(string account, int operatorId) { DataSet ds = SqlDataHelper.ExecuteDataSet(SqlDataHelper.GetConnection(), "Operator_View_Check", account, operatorId); if (DataValidate.CheckDataSetNotEmpty(ds)) { return(true); } return(false); }
public DataSet SelectAllMenu() { string sqlstr = "select * from dbo.Menu"; DataSet ds = SqlDataHelper.ExecuteDataSet(SqlDataHelper.GetConnection(), CommandType.Text, sqlstr); if (DataValidate.CheckDataSetNotEmpty(ds)) { return(ds); } return(null); }
public int InsertOperation(OperationEntity oe) { string sqlstr = "insert into dbo.Operation(Ope_Meu_ID,Csy_ID,Ope_Name,Ope_Url)values({0},{1},'{2}','{3}')"; sqlstr = string.Format(sqlstr, oe.MenuID, oe.CsyID, oe.OperateName, oe.OperateUrl); int ret = SqlDataHelper.ExecuteNonQuery(SqlDataHelper.GetConnection(), CommandType.Text, sqlstr); if (ret > 0) { return(1); } return(-1); }
public int InsertMenu(MenuEntity me) { string sqlstr = "insert into dbo.Menu (Csy_ID,Meu_Menu,Meu_FatherMenuID,Meu_Rank,Meu_Url)values({0},'{1}',{2},{3},'{4}')"; sqlstr = string.Format(sqlstr, me.CsyID, me.MenuName, me.FatherID, me.Rank, me.Url); int ret = SqlDataHelper.ExecuteNonQuery(SqlDataHelper.GetConnection(), CommandType.Text, sqlstr); if (ret > 0) { return(1); } return(-1); }
public bool InsertRoleOperate(int roleId, int operationId, int cmstid) { int ret = SqlDataHelper.ExecuteNonQuery(SqlDataHelper.GetConnection(), "RoleOperate_Insert", roleId, operationId, cmstid); if (ret > 0) { return(true); } else { return(false); } }
public int InsertOrganization(OrganizationEntity oe) { StringBuilder sb = new StringBuilder("insert into dbo.CmstOrganization(Cmst_ID,Cmst_Name,Cmst_IfUse)values("); sb.AppendFormat(" {0},", Convert.ToInt32(oe.CmstID)); sb.AppendFormat(" '{0}',", oe.CmstName); sb.AppendFormat(" {0})", oe.CmstIfUse == true ? 1 : 0); //DataSet ds = SqlDataHelper.ExecuteDataSet(SqlDataHelper.GetConnection(), CommandType.Text, sb.ToString()); int ret = SqlDataHelper.ExecuteNonQuery(SqlDataHelper.GetConnection(), CommandType.Text, sb.ToString()); if (ret > 0) { return(1); } return(-1); }
public DepotsPropertyEntity SelectDepotsPropertyByName(string name) { string sqlstr = "select * from dbo.DepotsProperty where Dpr_name='{0}'"; sqlstr = String.Format(sqlstr, name); DataSet ds = SqlDataHelper.ExecuteDataSet(SqlDataHelper.GetConnection(), CommandType.Text, sqlstr); if (ds.Tables[0].Rows.Count > 0) { return(DsToDepotsPropertyEntity(ds)); } else { return(null); } }
public RateTypeEntity SelectRateTypeByName(string name) { string sqlstr = "select * from dbo.RateType where Rty_Name='{0}'"; sqlstr = String.Format(sqlstr, name); DataSet ds = SqlDataHelper.ExecuteDataSet(SqlDataHelper.GetConnection(), CommandType.Text, sqlstr); if (ds.Tables[0].Rows.Count > 0) { return(DsToRateTypeEntity(ds)); } else { return(null); } }
public int InsertOperatorEntity(OperatorEntity oe) { try { string sqlstr = $"insert into dbo.Operator(Ope_Account,Ope_Name,Ope_Password,Ope_IfUse,Ope_RevisionTime,Ope_Cmst_ID,Ope_Rol_ID,Ope_IfSysAccount)values('{oe.Account}','{oe.OperatorName}','{oe.Password}','{oe.IfUse}','{oe.UpdateTime}',{oe.CmstID},{oe.RoleID},'{oe.IfSysAccount}')"; int ret = SqlDataHelper.ExecuteNonQuery(SqlDataHelper.GetConnection(), CommandType.Text, sqlstr); if (ret > 0) { return(1); } return(-1); } catch (Exception ex) { throw ex; } }