Esempio n. 1
0
        public bool CheckLendAble(LendingInfoDetail lifd, string strWorkShop)
        {
            if (lifd.strLendingExInfo == 0)
            {
                return(true);
            }
            string strSQL = "select TAB_LendingDetail.nid,TAB_Org_Trainman.strWorkShopGUID ";

            strSQL += " from TAB_LendingDetail Left Join TAB_Org_Trainman On ";
            strSQL += " TAB_LendingDetail.strBorrowTrainmanGUID = Tab_Org_Trainman.strTrainmanGUID ";
            strSQL += " where strWorkShopGUID = '" + strWorkShop + "' and strLendingExInfo = " + lifd.strLendingExInfo + " and nReturnState = 0 and nLendingType = " + lifd.nLendingType + "";
            return(SqlHelper.ExecuteDataset(SqlHelper.ConnString, CommandType.Text, strSQL.ToString()).Tables[0].Rows.Count > 0);
        }
Esempio n. 2
0
        public bool CheckReturnAble(string TrainmanGUID, LendingInfoDetail lifd)
        {
            string strSQL = "select * from View_LendingInfoDetail where strBorrowTrainmanGUID =  ";

            strSQL += " '" + TrainmanGUID + "' and nReturnState = 0 and nLendingType = " + lifd.nLendingType + " and strLendingExInfo = " + lifd.strLendingExInfo + " ";
            DataTable dt = SqlHelper.ExecuteDataset(SqlHelper.ConnString, CommandType.Text, strSQL.ToString()).Tables[0];

            if (dt.Rows.Count > 0)
            {
                lifd.strGUID            = dt.Rows[0]["strGUID"].ToString();
                lifd.strLendingInfoGUID = dt.Rows[0]["strLendingInfoGUID"].ToString();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 3
0
        public LendingInfoDetail GetTrainmanNotReturnLendingInfo_DRToModelDTToList(DataRow dr)
        {
            LendingInfoDetail model = new LendingInfoDetail();

            if (dr != null)
            {
                model.strLendingInfoGUID = ObjectConvertClass.static_ext_string(dr["strLendingInfoGUID"]);
                model.nLendingType       = ObjectConvertClass.static_ext_int(dr["nLendingType"]);
                model.strLendingExInfo   = ObjectConvertClass.static_ext_int(dr["strLendingExInfo"]);
                model.nReturnState       = ObjectConvertClass.static_ext_int(dr["nReturnState"]);
                model.dtModifyTime       = ObjectConvertClass.static_ext_date(dr["dtModifyTime"]);
                model.strGUID            = ObjectConvertClass.static_ext_string(dr["strGUID"]);
                model.nID                       = ObjectConvertClass.static_ext_int(dr["nID"]);
                model.dtBorrwoTime              = ObjectConvertClass.static_ext_date(dr["dtBorrowTime"]);
                model.dtGiveBackTime            = ObjectConvertClass.static_ext_date(dr["dtGiveBackTime"]);
                model.nBorrowVerifyType         = ObjectConvertClass.static_ext_int(dr["nBorrowLoginType"]);
                model.nGiveBackVerifyType       = ObjectConvertClass.static_ext_int(dr["nGiveBackLoginType"]);
                model.strLenderGUID             = ObjectConvertClass.static_ext_string(dr["strLenderGUID"]);
                model.strTrainmanGUID           = ObjectConvertClass.static_ext_string(dr["strBorrowTrainmanGUID"]);
                model.strGiveBackTrainmanGUID   = ObjectConvertClass.static_ext_string(dr["strGiveBackTrainmanGUID"]);
                model.strTrainmanNumber         = ObjectConvertClass.static_ext_string(dr["strBorrowTrainmanNumber"]);
                model.strTrainmanName           = ObjectConvertClass.static_ext_string(dr["strBorrowTrainmanName"]);
                model.strLenderNumber           = ObjectConvertClass.static_ext_string(dr["strLenderNumber"]);
                model.strLenderName             = ObjectConvertClass.static_ext_string(dr["strLenderName"]);
                model.strGiveBackTrainmanNumber = ObjectConvertClass.static_ext_string(dr["strGiveBackTrainmanNumber"]);
                model.strGiveBackTrainmanName   = ObjectConvertClass.static_ext_string(dr["strGiveBackTrainmanName"]);
                model.strBorrowVerifyTypeName   = ObjectConvertClass.static_ext_string(dr["strBorrowLoginTypeName"]);
                model.strGiveBackVerifyTypeName = ObjectConvertClass.static_ext_string(dr["strGiveBackLoginTypeName"]);
                model.strLendingTypeName        = ObjectConvertClass.static_ext_string(dr["strLendingTypeName"]);
                model.strLendingTypeAlias       = ObjectConvertClass.static_ext_string(dr["strAlias"]);
                model.strStateName              = ObjectConvertClass.static_ext_string(dr["strStateName"]);
                model.nKeepMunites              = ObjectConvertClass.static_ext_int(dr["nMinutes"]);
                model.strWorkShopGUID           = ObjectConvertClass.static_ext_string(dr["strWorkShopGUID"]);
            }
            return(model);
        }